Docker Run error

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
In an attempt to make a backup of my container configuration files I have been running
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose -v 1 $(docker ps -aq) >> mydocker.yml
as a cron job. The file it produced was somewhat useful in working out what I had done with a container, so if I need to set up that container again I at least have a clue and a reminder. I am not expecting the file to be directly useable. This is mostly theory

In 22.02.2.1 this worked just fine - I never tested the result (hope I never have to) but the theory is at least somehat good.
In 22.02.3 I get the output below and unsuprisingly a blank output file

root@NewNAS[~/truetool]# docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose -v 1 $(docker ps -aq) >> mydocker.yml Unable to find image 'ghcr.io/red5d/docker-autocompose:latest' locally latest: Pulling from red5d/docker-autocompose 213ec9aee27d: Already exists 6b2a141cd227: Pulling fs layer a292fad6b52e: Pulling fs layer 4593e4e33a59: Pulling fs layer 9fc487f38654: Pulling fs layer 80327cbcd20d: Pulling fs layer fc36615427f5: Pulling fs layer 4ad104d622dc: Pulling fs layer 80327cbcd20d: Waiting fc36615427f5: Waiting 9fc487f38654: Waiting 4593e4e33a59: Verifying Checksum 4593e4e33a59: Download complete 6b2a141cd227: Verifying Checksum 6b2a141cd227: Download complete a292fad6b52e: Verifying Checksum a292fad6b52e: Download complete 9fc487f38654: Verifying Checksum 9fc487f38654: Download complete 80327cbcd20d: Verifying Checksum 80327cbcd20d: Download complete fc36615427f5: Download complete 6b2a141cd227: Pull complete 4ad104d622dc: Verifying Checksum 4ad104d622dc: Download complete a292fad6b52e: Pull complete 4593e4e33a59: Pull complete 9fc487f38654: Pull complete 80327cbcd20d: Pull complete fc36615427f5: Pull complete 4ad104d622dc: Pull complete Digest: sha256:df4f4ec611b5e2bdce986e2c7c598b8eecc3b2c439a6fc13dc5f6049864901b9 Status: Downloaded newer image for ghcr.io/red5d/docker-autocompose:latest Traceback (most recent call last): File "/usr/src/app/./autocompose.py", line 188, in <module> main() File "/usr/src/app/./autocompose.py", line 27, in main cfile, c_networks, c_volumes = generate(cname) File "/usr/src/app/./autocompose.py", line 137, in generate assumed_default_network = list(cattrs['NetworkSettings']['Networks'].keys())[0] IndexError: list index out of range

I am not a docker expert so am not sure where to go from here
 
Top