aci format: default workdir / due to ACI spec
This commit is contained in:
parent
d4ab4a2ea1
commit
a3afedfbbd
1 changed files with 3 additions and 2 deletions
|
@ -148,7 +148,7 @@ class ACIImage(TarImageFormatter):
|
||||||
if exec_path and not exec_path[0].startswith('/'):
|
if exec_path and not exec_path[0].startswith('/'):
|
||||||
exec_path = ['/bin/sh', '-c', '""%s""' % ' '.join(exec_path)]
|
exec_path = ['/bin/sh', '-c', '""%s""' % ' '.join(exec_path)]
|
||||||
|
|
||||||
# TODO: ACI doesn't support : in the name, so remove any ports.
|
# TODO(jschorr): ACI doesn't support : in the name, so remove any ports.
|
||||||
hostname = app.config['SERVER_HOSTNAME']
|
hostname = app.config['SERVER_HOSTNAME']
|
||||||
hostname = hostname.split(':', 1)[0]
|
hostname = hostname.split(':', 1)[0]
|
||||||
|
|
||||||
|
@ -172,10 +172,11 @@ class ACIImage(TarImageFormatter):
|
||||||
],
|
],
|
||||||
"app": {
|
"app": {
|
||||||
"exec": exec_path,
|
"exec": exec_path,
|
||||||
|
# Below, `or 'root'` is required to replace empty string from Dockerfiles.
|
||||||
"user": config.get('User', '') or 'root',
|
"user": config.get('User', '') or 'root',
|
||||||
"group": config.get('Group', '') or 'root',
|
"group": config.get('Group', '') or 'root',
|
||||||
"eventHandlers": [],
|
"eventHandlers": [],
|
||||||
"workingDirectory": config.get('WorkingDir', ''),
|
"workingDirectory": config.get('WorkingDir', '') or '/',
|
||||||
"environment": [{"name": key, "value": value}
|
"environment": [{"name": key, "value": value}
|
||||||
for (key, value) in [e.split('=') for e in config.get('Env')]],
|
for (key, value) in [e.split('=') for e in config.get('Env')]],
|
||||||
"isolators": ACIImage._build_isolators(config),
|
"isolators": ACIImage._build_isolators(config),
|
||||||
|
|
Reference in a new issue