compose icon indicating copy to clipboard operation
compose copied to clipboard

Ability to list all Compose projects

Open danielwinter83 opened this issue 11 years ago • 15 comments

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?

danielwinter83 avatar Jan 04 '15 12:01 danielwinter83

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.

thaJeztah avatar Jan 04 '15 12:01 thaJeztah

+1. My development workflow would greatly benefit from this.

jhirn avatar Jan 12 '15 15:01 jhirn

Now that we have labels for projects, I think this would be possible.

dnephin avatar Aug 08 '15 15:08 dnephin

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.

stale[bot] avatar Oct 10 '19 03:10 stale[bot]

This would be a nice feature to have so can the stale label be removed?

daveisfera avatar Oct 10 '19 18:10 daveisfera

This issue has been automatically marked as not stale anymore due to the recent activity.

stale[bot] avatar Oct 10 '19 18:10 stale[bot]

It looks like the info is available so this should be a relatively simple addition: https://gist.github.com/mortenson/538027ef218a52e190be7b9b2c17a3ca

daveisfera avatar Nov 11 '19 18:11 daveisfera

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.

stale[bot] avatar May 09 '20 19:05 stale[bot]

This is still an issue

daveisfera avatar May 10 '20 00:05 daveisfera

This issue has been automatically marked as not stale anymore due to the recent activity.

stale[bot] avatar May 10 '20 00:05 stale[bot]

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.

selurvedu avatar May 10 '20 17:05 selurvedu

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.

stale[bot] avatar Nov 07 '20 04:11 stale[bot]

This issue has been automatically closed because it had not recent activity during the stale period.

stale[bot] avatar Nov 14 '20 08:11 stale[bot]

Can this issue be reopened please?

BeatLink avatar Nov 15 '20 06:11 BeatLink

bump, would be great to reopen this

pirate avatar Sep 10 '24 22:09 pirate