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

Introduce ps --orphans to include/exclude services not declared by project #11220

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Nov 23, 2023

What I did
Introduce --orphans so user can include/exclude services not declared by project
defaults to true for backward compatibility
usage:

services:
  dev:
    image: nginx
  dev2:
    profiles: [test]
    image: nginx
$ docker compose ps 
NAME           IMAGE     
chose-dev-1    nginx            // expected 
chose-dev2-1   nginx           // disabled by profile
chose-test-1   alpine            // not declared in project

$ docker compose ps --orphans=false
NAME          IMAGE     
chose-dev-1   nginx   

Related issue
closes #10312

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

@ndeloof ndeloof requested review from a team, nicksieger, StefanScherer, ulyssessouza, glours, milas and laurazard and removed request for a team November 23, 2023 12:42
…red by project

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

@glours glours merged commit ba24a65 into docker:main Nov 23, 2023
26 checks passed
@ndeloof ndeloof deleted the ps_profile branch December 20, 2023 13:50
matt9ucci added a commit to matt9ucci/DockerCompletion that referenced this pull request Apr 8, 2024
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.

Profile filter for docker-compose ps
2 participants