Skip to content

Commit 98704a8

Browse files
Fix 'networks' in yaml
fix opts following official compose reference [docker-compose reference](https://docs.docker.com/compose/compose-file/compose-file-v3/)
1 parent a3ff653 commit 98704a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autocompose.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def generate(cname):
6060
#'log_driver': cattrs['HostConfig']['LogConfig']['Type'],
6161
#'log_opt': cattrs['HostConfig']['LogConfig']['Config'],
6262
'logging': {'driver': cattrs['HostConfig']['LogConfig']['Type'], 'options': cattrs['HostConfig']['LogConfig']['Config']},
63-
'networks': {x: {'aliases': cattrs['NetworkSettings']['Networks'][x]['Aliases']} for x in cattrs['NetworkSettings']['Networks'].keys()},
63+
'networks': {x for x in cattrs['NetworkSettings']['Networks'].keys()},
6464
'security_opt': cattrs['HostConfig']['SecurityOpt'],
6565
'ulimits': cattrs['HostConfig']['Ulimits'],
6666
'volumes': cattrs['HostConfig']['Binds'],
@@ -87,7 +87,7 @@ def generate(cname):
8787
networklist = c.networks.list()
8888
networks = {}
8989
for network in networklist:
90-
if network.attrs['Name'] in values['networks'].keys():
90+
if network.attrs['Name'] in values['networks']:
9191
networks[network.attrs['Name']] = {'external': (not network.attrs['Internal'])}
9292

9393
# Check for command and add it if present.

0 commit comments

Comments
 (0)