When extending, build replaces image and vice versa

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2015-03-30 17:14:19 -04:00
commit 2a415ede08
2 changed files with 39 additions and 0 deletions

View file

@ -189,6 +189,12 @@ def merge_service_dicts(base, override):
override.get('volumes'),
)
if 'image' in override and 'build' in d:
del d['build']
if 'build' in override and 'image' in d:
del d['image']
for k in ALLOWED_KEYS:
if k not in ['environment', 'volumes']:
if k in override: