docker-autocompose icon indicating copy to clipboard operation
docker-autocompose copied to clipboard

An all argument to make listing all containers easier

Open fryfrog opened this issue 4 years ago • 4 comments

It'd be kind of useful if there was an all argument one could pass instead of individual container names. Would be a little bit of a time saver where we use this to help support people w/ Docker issues. :)

fryfrog avatar Oct 13 '21 16:10 fryfrog

In the meantime: python autocompose.py $(docker ps -a | awk '(NR>1) {print $1}') > my_containers.yaml

inovision avatar Oct 13 '21 19:10 inovision

In the meantime: python autocompose.py $(docker ps -a | awk '(NR>1) {print $1}') > my_containers.yaml

you can use docker ps -q in order to get just the ids. Something like

docker ps -q | xargs docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose

maxcanna avatar Nov 30 '21 22:11 maxcanna

This would ideally be the default behavior since the empty compose file generated isn't very useful at all.

mattbab avatar Jan 13 '22 21:01 mattbab

for a single one-liner:

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose $(docker ps -aq)

hgghyxo avatar Feb 24 '22 10:02 hgghyxo

Using the new flag causes the temporary container itself to be present in the output

maxcanna avatar May 01 '23 06:05 maxcanna