You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
env_file should take precedence on environment variables #1741
I don't understand why it's the other way around.
Changing it means you could have some default values hardcoded in yml, but still allow for custom values per install.
It was done that way for symmetry with docker run (where --env takes precedence over --env-file), but I agree it's not the most useful.
Changing it would break backwards compatibility, so it'd probably need to be a two-step process of releasing a version that warns about the change if you have variables that conflict, and then making the change in the next version.
Activity
aanand commentedon Jul 21, 2015
It was done that way for symmetry with
docker run(where--envtakes precedence over--env-file), but I agree it's not the most useful.Changing it would break backwards compatibility, so it'd probably need to be a two-step process of releasing a version that warns about the change if you have variables that conflict, and then making the change in the next version.
thaJeztah commentedon Aug 10, 2015
if we want this, I think both docker and compose should change (to keep the same behavior)
dnephin commentedon Oct 16, 2015
Closing this since it needs to happen in docker engine first, and it's unlikely we'll be breaking backwards compatibility.