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
pull/777/head
Min RK 2019-09-06 12:28:12 +02:00
rodzic 0e2349fdec
commit 3cc3aa4968
1 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -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"