Skip to content

Commit

Permalink
Merge pull request #39 from arschles/del-img
Browse files Browse the repository at this point in the history
feat(rootfs/deploy.py): remove image after it's pushed
  • Loading branch information
arschles committed Apr 21, 2016
2 parents 8e3a1c0 + 45932c3 commit 65ce61a
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 65ce61a

Please sign in to comment.