diff --git a/Dockerfile b/Dockerfile index e65a8db797462221fd1b622d67afad030f91332e..3513047df4e98250011aab84ada0c7bde366b7a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ ARG DOCKER_REGISTRY=registry.cyberbrain.pw ARG DOCKER_IMAGE_GIT=$DOCKER_REGISTRY/tools/docker/git/main ARG DOCKER_IMAGE_UBUNTU=$DOCKER_REGISTRY/tools/docker/ubuntu/main +ARG SOPDS_GIT_TAG ############################################################ FROM $DOCKER_IMAGE_GIT AS git RUN set -ex && \ - ( git clone --depth=1 https://gitlab.cyberbrain.pw/tools/mirror/sopds.git /tmp || echo error: failed to clone master repository. ) && \ + ( git clone https://gitlab.cyberbrain.pw/tools/mirror/sopds.git /tmp || echo error: failed to clone master repository. ) && \ + git -C /tmp -c advice.detachedHead=false checkout ${SOPDS_GIT_TAG:-$(git -C /tmp tag | grep -e '^v' | sort -V | tail -n 1)} && \ ls -la /tmp ############################################################