-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for --env-file option for docker-compose #6535
Conversation
…nvironment variables from a given PATH. Signed-off-by: Dimitrios Mavrommatis <jim.mavrommatis@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @slowr!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As noticed in #6170 (comment), this PR doesn't allow for multiple environment-files to be loaded at the same time.. Will that be added to a future PR, or was it forgotten about, or not in scope? Sorry for adding this comment too late. But I'm curious if there are plans for adding multi-env support.. |
This was considered out of scope for now but we can investigate it. |
Uhm, didn't this make it into 1.24.0? It was commited nearly 2 months ago but I can't find it in the commits for rc1 or rc3 of 1.24.0 and rc2 is missing in the release history. |
@M451 You are right. The reason is that the focus of 1.24.0 was around stability in some aspects. |
@ulyssessouza Will this feature be added to the next release? |
It's been a while since the last comment, but I have |
@GammaGames it took me a while to figure out, but it looks like it actually is there. It just doesn't appear in the help output for subcommands, e.g. |
Does not work for me on latest version. :(
|
Strange. It works for me. What version does your docker-compose report? |
This is the ridiculous sort of thing we have to do to compensate for this not being here:
|
➜ ~ docker-compose --version
These did not work
did not work! |
@entrptaher I don't have it in front of me right now but I think if you look at the source it's a global parameter to docker-compose, so as far as I remember I had to use |
Yes, that's what I said above, |
@entrptaher |
@M451, sure, here you go. I tested with every combination available on the issue section of this repo. |
actually, it's |
I hope this is the right place to ask this… File structure: This works as expected, the app builds, starts, all containers are correctly named via the variabel – so far so dandy. Additionally the app console echos some of these on startup: I am on the latest OSX, with Docker Desktop 4.5.0 (74594) / Docker version 20.10.12, build e91ed57 | Docker Compose version v2.2.3 |
Can you try this one?
Basically pass all arguments every time. |
Is there any option to use more than one |
Added additional argument (--env-file) for docker-compose to import environment variables from a given file.
Resolves #6170