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
I Believe this is part of previous requests #1973 & #9181.
which defines that some commands don't need to validate full config.
my issue that when I pull images, using env_file with required=true.
the pull fails due to missing env file.
My expectation is that the required is part of running the compose (and validating), not pulling.
If there is situation that env_file is expected as part of pull (which I'm not aware of such situations), I would expect option to declare that its required only for commands such up but ignored for pull.
for example required: "runtime"
Steps To Reproduce
add to docker-compose.yml
env_file:
- path: .myservice.env
required: true
run docker compose pull
command fails due to missing file. - undesired behavior
edit to required: false
command succeeded.
but now docker compose up ignores missing file as well
Compose Version
Docker Compose version v2.25.0
Docker Environment
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Docker Compose indeed fully parse and resolve your compose file before it execute any command, and doing so will detect missing env file whenever this isn't used by the pull command.
This is comparable to #10993
We miss a more flexible mechanism to only load and validate required parts of a compose model depending on command being ran.
Description
I Believe this is part of previous requests #1973 & #9181.
which defines that some commands don't need to validate full config.
my issue that when I pull images, using env_file with required=true.
the pull fails due to missing env file.
My expectation is that the
required
is part of running the compose (and validating), not pulling.If there is situation that env_file is expected as part of pull (which I'm not aware of such situations), I would expect option to declare that its required only for commands such
up
but ignored forpull
.for example
required: "runtime"
Steps To Reproduce
docker compose pull
required: false
docker compose up
ignores missing file as wellCompose Version
Docker Environment
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: