Skip to content
Snippets Groups Projects
Commit 7dabf4fe authored by Thomas FOURIER's avatar Thomas FOURIER
Browse files

Docker

parent bb47aa6c
No related branches found
No related tags found
1 merge request!14Docker
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
*.out *.out
*.out *.out
*.toc *.toc
source/polytechnique.fdb_latexmk *.fdb_latexmk
source/polytechnique.fls *.fls
# This file is a template, and might need editing before it works on your project. #global variables
# use docker image with latex preinstalled variables:
# since there is no official latex image, use https://github.com/blang/latex-docker IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
# possible alternative: https://github.com/natlownes/docker-latex
image: blang/latex:ctanfull
build: stages:
- ship
- test
test:
stage: test
image: $IMAGE_TAG
script: script:
- cd source - cd source
- latex polytechnique.ins - latex polytechnique.ins
- pdflatex polytechnique.dtx - latexmk -pdf polytechnique.dtx
- cp * ../guide/ - cp * ../guide/
- cd ../guide - cd ../guide
- pdflatex installation.tex - latexmk -pdf installation.tex
artifacts: artifacts:
paths: paths:
- "source/polytechnique.sty" - "source/polytechnique.sty"
- "source/polytechnique.pdf" - "source/polytechnique.pdf"
- "guide/installation.pdf" - "guide/installation.pdf"
ship:docker:
stage: ship
image: docker:stable
services:
- docker:dind
cache: {}
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
# For disabling TLS in docker-in-docker (not needed)
DOCKER_TLS_CERTDIR: ''
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --pull -t $IMAGE_TAG .
- docker push $IMAGE_TAG
FROM debian:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -q \
&& apt-get install -qy build-essential wget libfontconfig1 rsync \
&& rm -rf /var/lib/apt/lists/*
# Install TexLive with scheme-basic
RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz; \
mkdir /install-tl-unx; \
tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1; \
echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile; \
/install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile; \
rm -r /install-tl-unx; \
rm install-tl-unx.tar.gz
ENV PATH="/usr/local/texlive/2024/bin/x86_64-linux:${PATH}"
RUN . /etc/profile
WORKDIR /data
# Install latex packages
RUN tlmgr install latexmk babel-french csquotes xcolor titlesec lastpage hypdoc
VOLUME ["/data"]
COPY source ./source
COPY install ./install
RUN cd install; ./unix.sh
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment