commit
8afb4691a5
1 changed files with 5 additions and 13 deletions
|
@ -84,7 +84,7 @@ class ACIImage(TarImageFormatter):
|
|||
""" Builds the ports definitions for the ACI. """
|
||||
ports = []
|
||||
|
||||
for docker_port_definition in docker_config.get('ports', {}):
|
||||
for docker_port_definition in docker_config.get('ports', docker_config.get('Ports', {})):
|
||||
# Formats:
|
||||
# port/tcp
|
||||
# port/udp
|
||||
|
@ -117,20 +117,12 @@ class ACIImage(TarImageFormatter):
|
|||
names = set()
|
||||
|
||||
def get_name(docker_volume_path):
|
||||
parts = docker_volume_path.split('/')
|
||||
name = ''
|
||||
return "volume-%s" % docker_volume_path.replace('/', '-')
|
||||
|
||||
while True:
|
||||
name = name + parts[-1]
|
||||
parts = parts[0:-1]
|
||||
if names.add(name):
|
||||
break
|
||||
for docker_volume_path in docker_config.get('volumes', docker_config.get('Volumes', {})):
|
||||
if not docker_volume_path:
|
||||
continue
|
||||
|
||||
name = '/' + name
|
||||
|
||||
return name.lower()
|
||||
|
||||
for docker_volume_path in docker_config.get('volumes', {}):
|
||||
volumes.append({
|
||||
"name": get_name(docker_volume_path),
|
||||
"path": docker_volume_path,
|
||||
|
|
Reference in a new issue