Skip to content

Commit

Permalink
fix volume export based off of Red5d#17 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Doussan authored and Adam Doussan committed Aug 13, 2022
1 parent e19c465 commit be49cb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autocompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def generate(cname):
'networks': {x for x in cattrs['NetworkSettings']['Networks'].keys() if x != 'bridge'},
'security_opt': cattrs['HostConfig']['SecurityOpt'],
'ulimits': cattrs['HostConfig']['Ulimits'],
'volumes': cattrs['HostConfig']['Binds'],
'volumes': cattrs['HostConfig']['Binds'] or
[f'{m["Source"]}:{m["Target"]}' for m in cattrs['HostConfig']['Mounts']],
'volume_driver': cattrs['HostConfig']['VolumeDriver'],
'volumes_from': cattrs['HostConfig']['VolumesFrom'],
'entrypoint': cattrs['Config']['Entrypoint'],
Expand Down

1 comment on commit be49cb6

@Red5d
Copy link

@Red5d Red5d commented on be49cb6 Aug 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this works to solve the problem you're experiencing, go ahead and submit a PR and I'll merge it. I tested this myself just now actually and it seems to work for me.

Please sign in to comment.