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

Container with network within another container

Open LordDeimos666 opened this issue 2 years ago • 2 comments

While tring to get the docker compose of an old container that use the network of another container it gives this error:

Traceback (most recent call last): File "/root/docker-autocompose-master/autocompose.py", line 211, in <module> main() File "/root/docker-autocompose-master/autocompose.py", line 29, in main cfile, c_networks, c_volumes = generate(cname, createvolumes=args.createvolumes) File "/root/docker-autocompose-master/autocompose.py", line 140, in generate assumed_default_network = list(cattrs['NetworkSettings']['Networks'].keys())[0] IndexError: list index out of range

The old docker command for the network was --network=container:2fa4041a6e80a5499dbef6671ba30c2c40d40b70a4280db6d064bf20c43f5c6a

LordDeimos666 avatar Sep 03 '22 14:09 LordDeimos666

Hey @LordDeimos666

Can you try this https://github.com/Red5d/docker-autocompose/pull/53? that error should go away.

yeyeto2788 avatar Nov 02 '22 12:11 yeyeto2788

Sorry for the late answer. Not working, the nested network mode is not giving any result. I expect to have for example: network_mode: "service:wireguard"

LordDeimos666 avatar Feb 17 '23 00:02 LordDeimos666