Skip to content

compose images should list images of created containers#8990

Merged
ndeloof merged 1 commit intodocker:v2from
kiniou:fix-compose-images-v2
Dec 5, 2021
Merged

compose images should list images of created containers#8990
ndeloof merged 1 commit intodocker:v2from
kiniou:fix-compose-images-v2

Conversation

@kiniou
Copy link
Contributor

@kiniou kiniou commented Dec 3, 2021

Signed-off-by: Kevin Roy kiniou@gmail.com

What I did

Like in compose v1, the images sub-command should list images of created services instead of just the running ones.

I think this is due to the docker containers api is returning the list of running containers by default without status filters.
Therefore, we need to add All: true to get back the v1 behaviour according to the v1 python source code in cli/main.py where stopped=True and ends in all=True in project.py.

Related issue

closes #8806

@kiniou kiniou force-pushed the fix-compose-images-v2 branch from 86bac6f to 49feec4 Compare December 3, 2021 15:49
Signed-off-by: Kevin Roy <kiniou@gmail.com>
@kiniou kiniou force-pushed the fix-compose-images-v2 branch from 49feec4 to 32a0e88 Compare December 3, 2021 16:10
@ndeloof
Copy link
Contributor

ndeloof commented Dec 5, 2021

nice catch!

@ndeloof ndeloof merged commit d7d29b2 into docker:v2 Dec 5, 2021
@kiniou kiniou deleted the fix-compose-images-v2 branch December 6, 2021 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compose v2 images only report if container is running

2 participants