This commit is contained in:
Joseph Schorr 2015-02-05 17:37:58 -05:00
parent 83c676f3f7
commit e1c5ccb7d6
2 changed files with 7 additions and 2 deletions

View file

@ -146,8 +146,8 @@ class ACIImage(TarImageFormatter):
# ACI requires that the execution command be absolutely referenced. Therefore, if we find
# a relative command, we give it as an argument to /bin/sh to resolve and execute for us.
entrypoint = config.get('Entrypoint') or []
exec_path = entrypoint + config.get('Cmd') or []
entrypoint = config.get('Entrypoint', []) or []
exec_path = entrypoint + (config.get('Cmd', []) or [])
if exec_path and not exec_path[0].startswith('/'):
exec_path = ['/bin/sh', '-c', '""%s""' % ' '.join(exec_path)]