Closed fryfrog closed 1 year ago
In the meantime:
python autocompose.py $(docker ps -a | awk '(NR>1) {print $1}') > my_containers.yaml
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
This would ideally be the default behavior since the empty compose file generated isn't very useful at all.
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)
Using the new flag causes the temporary container itself to be present in the output
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. :)