From be49cb6670ae675c72e554d7148ef8ce227d843b Mon Sep 17 00:00:00 2001 From: Adam Doussan Date: Sat, 13 Aug 2022 12:57:20 -0500 Subject: [PATCH] fix volume export based off of https://github.com/Red5d/docker-autocompose/issues/17#issuecomment-943041549 --- autocompose.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autocompose.py b/autocompose.py index 9594219..35f9d3a 100644 --- a/autocompose.py +++ b/autocompose.py @@ -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'],