Commit a4e7cef2 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Docker: add versioning of dependencies Docker image

(cherry picked from commit b36ba7a0)
parent ecf72cbf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
variables:
    DOCKER_DEPS_IMAGE: "gitlab-registry.cern.ch/allpix-squared/allpix-squared/allpix-squared-deps:v2"
    EOS_PATH: "/eos/project/a/allpix-squared/www/"
    DOCKER_FILE: etc/docker/Dockerfile

@@ -37,7 +38,7 @@ stages:
        - mkdir -p build/ && cd build/

.docker:
    image: gitlab-registry.cern.ch/allpix-squared/allpix-squared/allpix-squared-deps:latest
    image: $DOCKER_DEPS_IMAGE
    tags:
        - docker
    before_script:
+3 −2
Original line number Diff line number Diff line
@@ -202,12 +202,13 @@ It derives from the latest Ubuntu LTS Docker image and can be build using the \f
\begin{verbatim}
$ docker build --file etc/docker/Dockerfile.deps            \
               --tag gitlab-registry.cern.ch/allpix-squared/\
               allpix-squared/allpix-squared-deps           \
               allpix-squared/allpix-squared-deps:vX        \
              .
$ docker push gitlab-registry.cern.ch/allpix-squared/\
              allpix-squared/allpix-squared-deps
\end{verbatim}
This image is created manually and only updated when necessary, i.e.\ if major new version of the underlying dependencies are available.
This image is created manually and only updated when necessary, i.e.\ if major new version of the underlying dependencies are available. The placeholder \parameter{vX} is a version number which should be incremented when applying changes or updating software versions in the \parameter{deps} Docker image. This version number should subsequently also be adjusted in the CI pipeline (\parameter{.gitlab-ci.yml}) and the Allpix Squared Docker file (\parameter{/etc/docker/Dockerfile}) so that the correct dependencies image is picked up.


\begin{warning}
  The dependencies Docker image should not be flattened with commands like
+2 −4
Original line number Diff line number Diff line
FROM gitlab-registry.cern.ch/allpix-squared/allpix-squared/allpix-squared-deps:latest
FROM gitlab-registry.cern.ch/allpix-squared/allpix-squared/allpix-squared-deps:v2
MAINTAINER Simon Spannagel <simon.spannagel@cern.ch>
ARG ALLPIX_BUILD_ENV="Docker"

@@ -12,9 +12,7 @@ WORKDIR "/data"
RUN mkdir -p /tmp/allpix-squared/build && \
    cd /tmp/allpix-squared/build && \
    cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ \
          -DBUILD_DatabaseWriter=ON \
          -DBUILD_LCIOWriter=ON \
          -DBUILD_VisualizationGeant4=OFF \
          -DBUILD_ALL_MODULES=ON \
          .. && \
    make -j`grep -c processor /proc/cpuinfo` && \
    make install && \