Commit a5d5862f authored by Дмитрий Сафронов's avatar Дмитрий Сафронов
Browse files

dockefile git tag

parent fc750b56
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
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

############################################################