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

Add compose file path to ls command #8573

Closed
BretFisher opened this issue Sep 3, 2021 · 2 comments
Closed

Add compose file path to ls command #8573

BretFisher opened this issue Sep 3, 2021 · 2 comments

Comments

@BretFisher
Copy link

ls is a great new feature for listing multiple projects, but it only shows project name, which could be custom if you use -p. Often, I'll start multiple versions of the same compose file with different project names, but it's hard to make sense of which project is which path as the CLI (and Docker Desktop Dashboard) don't show the compose file used.

Bonus points for also showing path to any overrides or layered compose files used in -f (or implicit with docker-compose.override.yml) using a -a or maybe --no-trunc.

I hope this would be an easy practice since the file path is listed in container labels.

"Config": {
  "Labels": {
    "com.docker.compose.project.config_files": "/Users/bret/code/tmp/rawkode/docker-compose.yml",
    "com.docker.compose.project.working_dir": "/Users/bret/code/tmp/rawkode"
  }
}

Current ls use:

docker compose ls

NAME                STATUS
override            running(4)
rawkode             running(3)
yoyo                running(3)

Suggested compose file feature in ls command. Path could be just the raw path(s) from the label

NAME                STATUS                CONFIG FILES
override            running(4)            /Users/bret/code/tmp/rawkode/docker-compose.yml,/Users/bret/code/tmp/rawkode/docker-compose.override.yml
rawkode             running(3)            /Users/bret/code/tmp/rawkode/docker-compose.yml
yoyo                running(3)            /Users/bret/code/tmp/rawkode/docker-compose.yml
@KoditkarVedant
Copy link
Contributor

@BretFisher @ndeloof I've worked on this enhancement and opened a pull request. Let me know your view.

@ndeloof
Copy link
Contributor

ndeloof commented Feb 18, 2022

closed by #9175

@ndeloof ndeloof closed this as completed Feb 18, 2022
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

No branches or pull requests

3 participants