Commit 456585dc authored by Bengt Giger's avatar Bengt Giger
Browse files

Added docker image CI/CD build

parent 98f48554
Pipeline #87640 canceled with stage
in 28 seconds
# This is a GitLab CI configuration to build the project as a docker image
# The file is generic enough to be dropped in a project containing a working Dockerfile
# Author: Florent CHAUVEAU <>
# Mentioned here:
# do not use "latest" here, if you want this to work in the future
image: docker:19.03.0-dind
- build
# Use this if your GitLab runner does not use socket binding
- docker:19.03.0-dind
DOCKER_HOST: tcp://localhost:2375
.docker-script-before: &docker-script-before
# docker login asks for the password to be passed through stdin for security
# we use $CI_JOB_TOKEN here which is a special token provided by GitLab
- echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
Build docker image:
- *docker-script-before
stage: build
- k8s-runner
- tags
# fetches the latest image (not failing if image is not found)
- docker pull $CI_REGISTRY_IMAGE:latest || true
# builds the project, passing proxy variables, and vcs vars for LABEL
# notice the cache-from, which is going to use the image we just pulled locally
# the built image is tagged locally with the commit SHA, and then pushed to
# the GitLab registry
- >
docker build
--build-arg http_proxy=$http_proxy
--build-arg https_proxy=$https_proxy
--build-arg no_proxy=$no_proxy
--build-arg VCS_REF=$CI_COMMIT_SHA
--cache-from $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest
......@@ -4,7 +4,6 @@ LABEL maintainer="Bengt Giger <>"
COPY laweb /usr/local/bin/laweb
COPY laweb.sty /usr/share/texlive/texmf-local/tex/latex/laweb.sty
COPY laweb.cfg /usr/share/texlive/texmf-local/tex/latex/laweb.cfg
COPY /usr/local/bin/
RUN dnf install -y texlive-tikz-dependency texlive-tex4ht texlive-scheme-full texlive-ifluatex
WORKDIR /home/workdir
#!/usr/bin/env bash
if [ "$(pwd)" != "/home/workdir" ]; then
cd /home/workdir
/usr/local/bin/laweb $1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment