Update .gitlab-ci.yml file: Make sure the resulting image’s original entry point is preserved

This commit is contained in:
Fifo F. 2024-06-11 06:26:05 +00:00
parent 17ef92fb3c
commit 1399cddec9

View file

@ -6,6 +6,7 @@ variables:
IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH}/sharelatex:with_texlive_full
ARCHIVED_IMAGE: sharelatex_with_texlive_full.tar
TEXLIVE_REPO: https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2023/tlnet-final
IMAGE_ENTRYPOINT: "/sbin/my_init"
build:
stage: build
@ -18,8 +19,8 @@ build:
- |
if [ ! -f $ARCHIVED_IMAGE ]; then
docker pull sharelatex/sharelatex:latest
docker run --name temp /bin/bash sharelatex/sharelatex:latest -c "tlmgr option repository $TEXLIVE_REPO && tlmgr update --self --all && tlmgr install scheme-full"
docker commit temp $IMAGE_NAME
docker run --name temp --entrypoint /bin/bash sharelatex/sharelatex:latest -c "tlmgr option repository $TEXLIVE_REPO && tlmgr update --self --all && tlmgr install scheme-full"
docker commit --change "ENTRYPOINT $IMAGE_ENTRYPOINT" temp $IMAGE_NAME
docker save -o $ARCHIVED_IMAGE $IMAGE_NAME
fi
artifacts: