Skip to content

Commit 3cc3aa4

Browse files
committed
use repo2docker version in docker tags
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
1 parent 0e2349f commit 3cc3aa4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

hooks/post_push

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/bash
22

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

0 commit comments

Comments
 (0)