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