aci format: default workdir / due to ACI spec

This commit is contained in:
Jimmy Zelinskie 2015-02-02 16:16:10 -05:00
parent d4ab4a2ea1
commit a3afedfbbd

View file

@ -148,7 +148,7 @@ class ACIImage(TarImageFormatter):
if exec_path and not exec_path[0].startswith('/'):
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 = hostname.split(':', 1)[0]
@ -172,10 +172,11 @@ class ACIImage(TarImageFormatter):
],
"app": {
"exec": exec_path,
# Below, `or 'root'` is required to replace empty string from Dockerfiles.
"user": config.get('User', '') or 'root',
"group": config.get('Group', '') or 'root',
"eventHandlers": [],
"workingDirectory": config.get('WorkingDir', ''),
"workingDirectory": config.get('WorkingDir', '') or '/',
"environment": [{"name": key, "value": value}
for (key, value) in [e.split('=') for e in config.get('Env')]],
"isolators": ACIImage._build_isolators(config),