From: Luca Heltai Date: Tue, 11 Apr 2023 06:00:39 +0000 (+0300) Subject: Build both focal and jammy images. X-Git-Tag: v9.5.0-rc1~329^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adf2098703692eb472e62732866e4162e287815d;p=dealii.git Build both focal and jammy images. --- diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3885ea87e0..b3b3148e06 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -26,11 +26,26 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and push Docker image of master + - name: Build and push Docker image of master focal uses: docker/build-push-action@v4 with: context: ./contrib/docker/ cache-from: type=registry,ref=dealii/dependencies:focal cache-to: type=inline + build-args: | + VER=master + IMG=focal push: ${{github.ref_name == 'master'}} tags: dealii/dealii:master-focal + + - name: Build and push Docker image of master jammy + uses: docker/build-push-action@v4 + with: + context: ./contrib/docker/ + cache-from: type=registry,ref=dealii/dependencies:jammy + cache-to: type=inline + build-args: | + VER=master + IMG=jammy + push: ${{github.ref_name == 'master'}} + tags: dealii/dealii:master-jammy diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile index 9ba8fca5c5..2893cd2cfb 100644 --- a/contrib/docker/Dockerfile +++ b/contrib/docker/Dockerfile @@ -1,12 +1,18 @@ -FROM dealii/dependencies:focal +ARG IMG=focal + +FROM dealii/dependencies:$IMG LABEL maintainer="luca.heltai@gmail.com" +ARG VER=master + USER root -RUN cd /usr/src \ - && git clone https://github.com/dealii/dealii \ - && cd dealii && mkdir build && cd build \ - && cmake -GNinja \ +RUN cd /usr/src && \ + git clone https://github.com/dealii/dealii dealii-$VER && \ + cd dealii-$VER && \ + git checkout $VER && \ + mkdir build && cd build && \ + cmake -GNinja \ -DCMAKE_PREFIX_PATH="/usr/lib/x86_64-linux-gnu/hdf5/openmpi;/usr/include/hdf5/openmpi" \ -DDEAL_II_ALLOW_AUTODETECTION=OFF \ -DDEAL_II_COMPILE_EXAMPLES=OFF \