Skip to content
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

only list running containers when --all=false #10086

Merged
merged 1 commit into from Dec 16, 2022
Merged

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Dec 16, 2022

What I did
List containers according to docker compose ps --all=? flag to exclude non-running ones by default

Related issue
closes #10085

(not mandatory) A picture of a cute animal, if possible in relation to what you did
image

@codecov
Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Base: 75.79% // Head: 76.98% // Increases project coverage by +1.19% 🎉

Coverage data is based on head (62b8031) compared to base (0eaa249).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2   #10086      +/-   ##
==========================================
+ Coverage   75.79%   76.98%   +1.19%     
==========================================
  Files           2        2              
  Lines         252      252              
==========================================
+ Hits          191      194       +3     
+ Misses         53       51       -2     
+ Partials        8        7       -1     
Impacted Files Coverage Δ
pkg/e2e/framework.go 75.31% <0.00%> (+1.27%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof requested review from a team, StefanScherer and glours and removed request for a team December 16, 2022 15:11
@ndeloof ndeloof merged commit e42673d into docker:v2 Dec 16, 2022
@ndeloof ndeloof deleted the ps_all branch December 16, 2022 20:46
@sayhiben
Copy link

After this change, I have to explicitly pass -a even though the documentation for docker compose ps states that stopped containers should be returned

By default, both running and stopped containers are shown:

$ docker compose ps
NAME           COMMAND                  SERVICE   STATUS       PORTS
example-bar-1  "/docker-entrypoint.…"   bar       exited (0)
example-foo-1  "/docker-entrypoint.…"   foo       running      0.0.0.0:8080->80/tcp

@ndeloof
Copy link
Contributor Author

ndeloof commented Jan 24, 2023

@sayhiben doc indeed is outdated, including the example output. docker compose ps UX has been aligned with docker ps for consistency

=> #10195

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.

docker-compose -p projectname ps ; lisiting services which not even are build
3 participants