From 3d0b404b7a99388296dda50d087d267bf3c6f917 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Tue, 28 Jun 2022 16:06:17 +0100 Subject: [PATCH 1/2] added multi stages option --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 755d9f2a06..152590161a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ # sudo docker run image_name:tag_name or ID with no tag sudo docker run ID number -FROM debian:bullseye-slim +FROM debian:bullseye-slim AS dependencies # By default this Dockerfile builds OpenMC without DAGMC and LIBMESH support ARG build_dagmc=off @@ -172,6 +172,8 @@ RUN if [ "$build_libmesh" = "on" ]; then \ && rm -rf ${LIBMESH_INSTALL_DIR}/build ${LIBMESH_INSTALL_DIR}/libmesh ; \ fi +FROM dependencies as build + # clone and install openmc RUN mkdir -p ${HOME}/OpenMC && cd ${HOME}/OpenMC \ && git clone --shallow-submodules --recurse-submodules --single-branch -b ${openmc_branch} --depth=1 ${OPENMC_REPO} \ @@ -207,5 +209,7 @@ RUN mkdir -p ${HOME}/OpenMC && cd ${HOME}/OpenMC \ && cd ../openmc && pip install .[test,depletion-mpi] \ && python -c "import openmc" +FROM build as release + # Download cross sections (NNDC and WMP) and ENDF data needed by test suite RUN ${HOME}/OpenMC/openmc/tools/ci/download-xs.sh From 419351bb260f837386bcd5c6e798405638820e17 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Tue, 28 Jun 2022 16:14:52 +0100 Subject: [PATCH 2/2] uppercase AS --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 152590161a..341390c9ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -172,7 +172,7 @@ RUN if [ "$build_libmesh" = "on" ]; then \ && rm -rf ${LIBMESH_INSTALL_DIR}/build ${LIBMESH_INSTALL_DIR}/libmesh ; \ fi -FROM dependencies as build +FROM dependencies AS build # clone and install openmc RUN mkdir -p ${HOME}/OpenMC && cd ${HOME}/OpenMC \ @@ -209,7 +209,7 @@ RUN mkdir -p ${HOME}/OpenMC && cd ${HOME}/OpenMC \ && cd ../openmc && pip install .[test,depletion-mpi] \ && python -c "import openmc" -FROM build as release +FROM build AS release # Download cross sections (NNDC and WMP) and ENDF data needed by test suite RUN ${HOME}/OpenMC/openmc/tools/ci/download-xs.sh