-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[BUG] config --images should not fail on missing env_file #10995
Copy link
Copy link
Closed
Labels
Description
Description
I'm extracting informations about docker-compose.yml files using docker compose config.
I would expect this command to be rather dumb, but it looks like it tries to fully load the config.
Using the --images argument should not require an env_file, in fact the env_file is only required to populate service's environment and this is not required to display the list of images.
Not that none of --no-consistency, --no-interpolate, --no-normalize and --no-path-resolution bypass this issue.
Steps To Reproduce
- Given the following
docker-compose.ymlfile:
version: "3"
services:
test:
image: hello-world:latest
env_file:
- .env
- Running
docker compose config --images - Outputs:
Failed to load /tmp/a/.env: open /tmp/a/.env: no such file or directorywith return code14
Compose Version
❯ docker compose version
Docker Compose version v2.21.0
### Docker Environment
```Text
I doubt this is relevant.
Anything else?
I could not find documentation about return codes for the docker compose config command.
Reactions are currently unavailable