Ability to list all Compose projects
Hi, with fig I want to run multiple instances of my application which consists of two containers. To achieve that I would use the --project-name to create multiple linked containers. I didn't seem to find a command which would show me a list of all running fig projects. As far as I understand I would have to remember them. Is there any option to list all containers sorted by projects?
No, currently there isn't such option. Fig doesn't keep a list of projects and (at this moment) only is able to find containers belonging to a project via the "naming convention"; [project-name]_[service-name]_[instance-number].
However, a discussion is currently going on upstream in docker to add "meta-data" to images and containers: https://github.com/docker/docker/pull/9882
If this feature will be implemented, this would give Fig more options to identify which containers are managed/created by Fig and which "project" they belong to. I think that would also give the opportunity to list all those containers, grouped by project.
So I suggest to keep track of that issue (https://github.com/docker/docker/pull/9882) to see what happens.
+1. My development workflow would greatly benefit from this.
Now that we have labels for projects, I think this would be possible.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This would be a nice feature to have so can the stale label be removed?
This issue has been automatically marked as not stale anymore due to the recent activity.
It looks like the info is available so this should be a relatively simple addition: https://gist.github.com/mortenson/538027ef218a52e190be7b9b2c17a3ca
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is still an issue
This issue has been automatically marked as not stale anymore due to the recent activity.
I currently use the following command to list all Compose projects:
alias compose-ps="docker ps --format 'table {{ .Names }}\t{{ .Status }}\t{{ .Label \"com.docker.compose.project\" }}\t{{ .Label \"com.docker.compose.service\" }}\t{{ .Label \"com.docker.compose.project.working_dir\" }}'"
But I still would like to see this feature properly implemented in Docker-Compose itself.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it had not recent activity during the stale period.
Can this issue be reopened please?
bump, would be great to reopen this