commit
ec35b3ba04
1 changed files with 12 additions and 2 deletions
|
@ -177,6 +177,17 @@ class ACIImage(TarImageFormatter):
|
||||||
hostname = app.config['SERVER_HOSTNAME']
|
hostname = app.config['SERVER_HOSTNAME']
|
||||||
hostname = hostname.split(':', 1)[0]
|
hostname = hostname.split(':', 1)[0]
|
||||||
|
|
||||||
|
# Calculate the environment variables.
|
||||||
|
docker_env_vars = config.get('Env', [])
|
||||||
|
env_vars = []
|
||||||
|
for var in docker_env_vars:
|
||||||
|
pieces = var.split('=')
|
||||||
|
if len(pieces) != 2:
|
||||||
|
continue
|
||||||
|
|
||||||
|
env_vars.append(pieces)
|
||||||
|
|
||||||
|
|
||||||
manifest = {
|
manifest = {
|
||||||
"acKind": "ImageManifest",
|
"acKind": "ImageManifest",
|
||||||
"acVersion": "0.6.1",
|
"acVersion": "0.6.1",
|
||||||
|
@ -202,8 +213,7 @@ class ACIImage(TarImageFormatter):
|
||||||
"group": config.get('Group', '') or 'root',
|
"group": config.get('Group', '') or 'root',
|
||||||
"eventHandlers": [],
|
"eventHandlers": [],
|
||||||
"workingDirectory": config.get('WorkingDir', '') or '/',
|
"workingDirectory": config.get('WorkingDir', '') or '/',
|
||||||
"environment": [{"name": key, "value": value}
|
"environment": [{"name": key, "value": value} for (key, value) in env_vars],
|
||||||
for (key, value) in [e.split('=') for e in config.get('Env', []) or []]],
|
|
||||||
"isolators": ACIImage._build_isolators(config),
|
"isolators": ACIImage._build_isolators(config),
|
||||||
"mountPoints": ACIImage._build_volumes(config),
|
"mountPoints": ACIImage._build_volumes(config),
|
||||||
"ports": ACIImage._build_ports(config),
|
"ports": ACIImage._build_ports(config),
|
||||||
|
|
Reference in a new issue