MCPcopy Index your code
hub / github.com/docker/docker-py / _host_volume_from_bind

Function _host_volume_from_bind

docker/models/containers.py:1184–1192  ·  view source on GitHub ↗
(bind)

Source from the content-addressed store, hash-verified

1182
1183
1184def _host_volume_from_bind(bind):
1185 drive, rest = ntpath.splitdrive(bind)
1186 bits = rest.split(':', 1)
1187 if len(bits) == 1 or bits[1] in ('ro', 'rw'):
1188 return drive + bits[0]
1189 elif bits[1].endswith(':ro') or bits[1].endswith(':rw'):
1190 return bits[1][:-3]
1191 else:
1192 return bits[1]
1193
1194
1195ExecResult = namedtuple('ExecResult', 'exit_code,output')

Callers 1

_create_container_argsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected