mirror of
https://git.fifo-f.eu/tex-projects/docker-images.git
synced 2025-04-24 07:18:05 +02:00
Update .gitlab-ci.yml file
This commit is contained in:
parent
278c0ccf1d
commit
cceabb328c
1 changed files with 18 additions and 6 deletions
|
@ -3,7 +3,8 @@ stages:
|
|||
- push
|
||||
|
||||
variables:
|
||||
IMAGE_NAME: registry.fifo-f.eu/${CI_PROJECT_PATH}/sharelatex
|
||||
IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH}/sharelatex
|
||||
ARCHIVED_IMAGE: sharelatex_with_texlive_full.tar
|
||||
TEXLIVE_REPO: https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2023/tlnet-final
|
||||
|
||||
build:
|
||||
|
@ -14,17 +15,22 @@ build:
|
|||
services:
|
||||
- name: docker:24.0.5-dind
|
||||
script:
|
||||
# Pull the existing ShareLaTeX/Overleaf Docker image
|
||||
# Pull the latest 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 --entrypoint /bin/bash sharelatex/sharelatex:latest -c "tlmgr option repository $TEXLIVE_REPO && tlmgr update --self --all && tlmgr install scheme-full"
|
||||
- docker run --name temp --entrypoint /bin/bash sharelatex/sharelatex:latest -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
|
||||
- docker commit temp sharelatex:with-texlive-full
|
||||
|
||||
# Tag the new image for GitLab registry
|
||||
- docker tag sharelatex:with-texlive-full $IMAGE_NAME:latest
|
||||
# - docker tag sharelatex:with-texlive-full $IMAGE_NAME:latest
|
||||
- docker save -o $ARCHIVED_IMAGE sharelatex:with-texlive-full
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- $ARCHIVED_IMAGE
|
||||
|
||||
push:
|
||||
stage: push
|
||||
|
@ -38,6 +44,12 @@ push:
|
|||
script:
|
||||
# Login to the GitLab registry
|
||||
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
||||
|
||||
# Load the Docker image from the previous stage
|
||||
- docker load -i $ARCHIVED_IMAGE
|
||||
|
||||
# Push the customized image to the GitLab registry
|
||||
- docker push $IMAGE_NAME:latest
|
||||
- docker push $IMAGE_NAME:latest
|
||||
artifacts:
|
||||
paths:
|
||||
- $ARCHIVED_IMAGE
|
Loading…
Add table
Add a link
Reference in a new issue