Skip to content

Commit

Permalink
feat(rootfs/deploy.py): remove image after it's pushed
Browse files Browse the repository at this point in the history
Fixes deis#29

fix(rootfs/deploy.py): use named params

fix(deploy.py): replace remote_image (typo) with remove_image

fix(deploy.py): fix another typo in noprune
  • Loading branch information
Aaron Schlesinger committed Apr 21, 2016
1 parent 8e3a1c0 commit 45932c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rootfs/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,13 @@ def download_file(tar_path):
repo = registry + "/" + os.getenv('IMG_NAME')
stream = client.build(tag=repo, stream=True, decode=True, rm=True, path='/app')
log_output(stream, True)

print("pushing to registry")
stream = client.push(registry+'/'+imageName, tag=imageTag, stream=True, insecure_registry=True)
if DEBUG:
log_output(stream, False)

print("deleting image")
stream = client.remove_image(image=registry+'/'+imageName, force=True, noprune=False)
if DEBUG:
log_output(stream, False)

0 comments on commit 45932c3

Please sign in to comment.