Skip to content

Commit

Permalink
fix build context loop bug
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelf-stratoscale authored and ravidbro committed Jul 5, 2017
1 parent 47b25f1 commit 13797c7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions skipper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ def build(ctx, images_to_build, container_context):
continue

fqdn_image = image + ':' + tag
if not container_context:
if ctx.obj['container_context']:
container_context = ctx.obj['container_context']
else:
container_context = os.path.dirname(dockerfile)
command = ['docker', 'build', '-f', dockerfile, '-t', fqdn_image, container_context]
if container_context is not None:
build_context = container_context
elif ctx.obj['container_context']:
build_context = ctx.obj['container_context']
else:
build_context = os.path.dirname(dockerfile)
command = ['docker', 'build', '-f', dockerfile, '-t', fqdn_image, build_context]
ret = runner.run(command)

if ret != 0:
Expand Down

0 comments on commit 13797c7

Please sign in to comment.