Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Conversation

@ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented May 17, 2021

What I did
updated ps output so

  • it does not show healthcheck status but for running container
  • it includes exit code for exited containers
  • it sort ports for predictable output

Related issue
close #1671
close #1672

@ndeloof ndeloof requested a review from ulyssessouza May 17, 2021 07:07
@github-actions github-actions bot added api api cli cli local Local context (moby) labels May 17, 2021
@ndeloof ndeloof force-pushed the ps_exitcode branch 4 times, most recently from 7889adf to 6bc2845 Compare May 17, 2021 07:53
@ndeloof ndeloof requested a review from lorenrh May 17, 2021 08:04
Copy link
Contributor

@lorenrh lorenrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🦖

{ID: "789", Name: "789", Project: testProject, Service: "service2", State: "Running", Health: "", Publishers: nil},
{ID: "123", Name: "123", Project: testProject, Service: "service1", State: "running", Health: "healthy", Publishers: nil},
{ID: "456", Name: "456", Project: testProject, Service: "service1", State: "running", Health: "", Publishers: []compose.PortPublisher{{URL: "localhost:80", TargetPort: 90, PublishedPort: 80}}},
{ID: "789", Name: "789", Project: testProject, Service: "service2", State: "exited", Health: "", ExitCode: 130, Publishers: nil},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should need compose.PsOptions{All: true} in order to see exited containers here ? Ah no, compose ps --all means show one-off containers, but by default in compose we list exited containers... :/

@ndeloof ndeloof merged commit 2162bc9 into docker-archive:main May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api api cli cli local Local context (moby)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker compose ps unstable ordering in Ports column docker compose ps does not list stopped containers and their exit status

3 participants