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

Docker: add versioning of dependencies Docker image

parent d66e7130
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@

variables:
    REPOSITORY: "https://gitlab.cern.ch/allpix-squared/allpix-squared.git"
    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

@@ -41,7 +42,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:
+5 −2
Original line number Diff line number Diff line
@@ -18,14 +18,17 @@ file via the following commands:
```shell
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
```

This image is created manually and only updated when necessary, i.e. if major new version of the underlying dependencies are
available.
available. The placeholder `vX` is a version number which should be incremented when applying changes or updating software
versions in the `deps` Docker image. This version number should subsequently also be adjusted in the CI pipeline
(`.gitlab-ci.yml`) and the Allpix Squared Docker file (`/etc/docker/Dockerfile`) so that the correct dependencies image is
picked up.

{{% alert title="Important" color="warning" %}}
The Docker image containing the dependencies should not be flattened with commands like
+1 −1
Original line number Diff line number Diff line
# SPDX-FileCopyrightText: 2018-2022 CERN and the Allpix Squared authors
# SPDX-License-Identifier: MIT

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"