1
0
mirror of https://github.com/mveril/qp-demo synced 2024-11-03 20:54:01 +01:00

make an ARG for the ubuntu version

This commit is contained in:
Mickaël Véril 2021-05-04 11:08:08 +02:00
parent d490ba7aa5
commit de85057715

View File

@ -1,6 +1,6 @@
# For help about how Dockerfiles work, see https://docs.docker.com/engine/reference/builder # For help about how Dockerfiles work, see https://docs.docker.com/engine/reference/builder
ARG UBUNTU_VERSION=20.04
FROM ubuntu:20.04 AS builder FROM ubuntu:${UBUNTU_VERSION} AS builder
# Build argument (can be changed at build time # Build argument (can be changed at build time
# This argument define timezone for tzdata requierd by qp_run # This argument define timezone for tzdata requierd by qp_run
ARG tz=Etc/UTC ARG tz=Etc/UTC
@ -31,13 +31,13 @@ RUN ./configure -i all -c config/gfortran_avx.cfg
RUN /bin/bash -c "source quantum_package.rc ; qp export_as_tgz" RUN /bin/bash -c "source quantum_package.rc ; qp export_as_tgz"
# Used to unpack QP2 # Used to unpack QP2
FROM ubuntu:20.04 AS unpack FROM ubuntu:${UBUNTU_VERSION} AS unpack
WORKDIR /tmp WORKDIR /tmp
COPY --from=builder /home/builder/qp2/quantum_package_static.tar.gz . COPY --from=builder /home/builder/qp2/quantum_package_static.tar.gz .
RUN tar -xf quantum_package_static.tar.gz RUN tar -xf quantum_package_static.tar.gz
# This image is based from Ubuntu LTS # This image is based from Ubuntu LTS
FROM ubuntu:20.04 FROM ubuntu:${UBUNTU_VERSION}
LABEL version="1.1" \ LABEL version="1.1" \
maintainer.name="Mickaël Véril" \ maintainer.name="Mickaël Véril" \
quantum_package.author.name="Anthony Scemama" \ quantum_package.author.name="Anthony Scemama" \