Skip to content

Commit

Permalink
use repo2docker version in docker tags
Browse files Browse the repository at this point in the history
docker tags will include versioneer tag, e.g. `0.10.0-4.abc123` where

- 0.10.0 is the latest tag
- 4 is the number of commits since then
- abc123 is the current commit hash
  • Loading branch information
minrk committed Sep 6, 2019
1 parent 0e2349f commit 3cc3aa4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions hooks/post_push
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# when building jupyter/repo2docker:master also push jupyter/repo2docker:abcd1234

HASH_IMAGE="$DOCKER_REPO:${SOURCE_COMMIT:0:8}"
docker tag $DOCKER_REPO:$DOCKER_TAG $HASH_IMAGE
docker push $HASH_IMAGE
# when building jupyter/repo2docker:master
# also push jupyter/repo2docker:1.2.3-3.abcd1234 (replace + with -)
version=$(docker run $DOCKER_REPO:$DOCKER_TAG jupyter-repo2docker --version | sed s@+@-@)
VERSION_IMAGE="$DOCKER_REPO:$version"
docker tag $DOCKER_REPO:$DOCKER_TAG "$VERSION_IMAGE"
docker push "$VERSION_IMAGE"

0 comments on commit 3cc3aa4

Please sign in to comment.