docker-images/.gitlab-ci.yml

41 lines
No EOL
1.3 KiB
YAML

stages:
- build
- push
variables:
IMAGE_NAME: registry.fifo-f.eu/${CI_PROJECT_PATH}/${CI_COMMIT_REF_SLUG}
TEXLIVE_REPO: https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2023/tlnet-final
build:
stage: build
tags:
- privileged
image: docker:24.0.5
services:
- name: docker:24.0.5-dind
script:
# Pull the existing ShareLaTeX/Overleaf Docker image
- docker pull sharelatex/sharelatex:latest
# Run the TeX Live installation inside the Docker container, specifying the 2023 repository
- docker run --name temp-container sharelatex/sharelatex:latest /bin/bash -c "tlmgr option repository $TEXLIVE_REPO && tlmgr update --self --all && tlmgr install scheme-full"
# Commit the changes to the Docker container
- docker commit temp-container sharelatex:with-texlive-full
# Tag the new image for GitLab registry
- docker tag sharelatex:with-texlive-full $IMAGE_NAME:latest
push:
stage: push
image: docker:24.0.5
services:
- name: docker:24.0.5-dind
dependencies:
- build
script:
# Login to the GitLab registry
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
# Push the customized image to the GitLab registry
- docker push $IMAGE_NAME:latest