diff --git a/share/spack/templates/container/Dockerfile b/share/spack/templates/container/Dockerfile index 7005c0cfae1..b10dcf084a0 100644 --- a/share/spack/templates/container/Dockerfile +++ b/share/spack/templates/container/Dockerfile @@ -19,8 +19,7 @@ RUN mkdir {{ paths.environment }} \ {{ manifest }} > {{ paths.environment }}/spack.yaml # Install the software, remove unnecessary deps -RUN spack install --fail-fast && \ - spack gc -y +RUN cd {{ paths.environment }} && spack env activate . && spack install --fail-fast && spack gc -y {% if strip %} # Strip all the binaries