mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix volume to support not binding volumes to host
This commit is contained in:
committed by
Matt Clay
parent
1aa1b617f5
commit
d373e0a7c4
@@ -831,7 +831,7 @@ class TaskParameters(DockerBaseClass):
|
|||||||
host = os.path.abspath(host)
|
host = os.path.abspath(host)
|
||||||
new_vols.append("%s:%s:rw" % (host, container))
|
new_vols.append("%s:%s:rw" % (host, container))
|
||||||
else:
|
else:
|
||||||
new_vols.append("%s:%s:rw" % (os.path.abspath(vol), vol))
|
new_vols.append(vol)
|
||||||
return new_vols
|
return new_vols
|
||||||
|
|
||||||
def _get_mounts(self):
|
def _get_mounts(self):
|
||||||
@@ -940,11 +940,6 @@ class TaskParameters(DockerBaseClass):
|
|||||||
bind=container,
|
bind=container,
|
||||||
mode=mode
|
mode=mode
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
self.volume_binds[vol] = dict(
|
|
||||||
bind=vol,
|
|
||||||
mode='rw'
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_exposed_ports(self):
|
def _parse_exposed_ports(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user