diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2020-07-16 19:15:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-16 13:15:04 -0400 |
commit | 34490872849fa54e81354a5d68cc84480c292004 (patch) | |
tree | d4d3a8ff3785e960a3e9362f1eba883bd83b00a9 /share/spack/docker | |
parent | 8e9f4d007875821e65c0138e38a567fcce7c56d2 (diff) | |
download | spack-34490872849fa54e81354a5d68cc84480c292004.tar.gz spack-34490872849fa54e81354a5d68cc84480c292004.tar.bz2 spack-34490872849fa54e81354a5d68cc84480c292004.tar.xz spack-34490872849fa54e81354a5d68cc84480c292004.zip |
Make the largest layer of the docker image cacheable (#17553)
Diffstat (limited to 'share/spack/docker')
-rw-r--r-- | share/spack/docker/centos-6.dockerfile | 28 | ||||
-rw-r--r-- | share/spack/docker/centos-7.dockerfile | 28 | ||||
-rw-r--r-- | share/spack/docker/ubuntu-1604.dockerfile | 28 | ||||
-rw-r--r-- | share/spack/docker/ubuntu-1804.dockerfile | 28 |
4 files changed, 56 insertions, 56 deletions
diff --git a/share/spack/docker/centos-6.dockerfile b/share/spack/docker/centos-6.dockerfile index 8c971124a5..1ba58d66af 100644 --- a/share/spack/docker/centos-6.dockerfile +++ b/share/spack/docker/centos-6.dockerfile @@ -9,20 +9,6 @@ ENV DOCKERFILE_BASE=centos \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ container=docker -COPY bin $SPACK_ROOT/bin -COPY etc $SPACK_ROOT/etc -COPY lib $SPACK_ROOT/lib -COPY share $SPACK_ROOT/share -COPY var $SPACK_ROOT/var -RUN mkdir -p $SPACK_ROOT/opt/spack - -RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/docker-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/interactive-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/spack-env - RUN yum update -y \ && yum install -y epel-release \ && yum update -y \ @@ -50,6 +36,20 @@ RUN yum update -y \ && rm -rf /var/cache/yum \ && yum clean all +COPY bin $SPACK_ROOT/bin +COPY etc $SPACK_ROOT/etc +COPY lib $SPACK_ROOT/lib +COPY share $SPACK_ROOT/share +COPY var $SPACK_ROOT/var +RUN mkdir -p $SPACK_ROOT/opt/spack + +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + RUN mkdir -p /root/.spack \ && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ /root/.spack/modules.yaml \ diff --git a/share/spack/docker/centos-7.dockerfile b/share/spack/docker/centos-7.dockerfile index 292663d922..c8dc75a0f3 100644 --- a/share/spack/docker/centos-7.dockerfile +++ b/share/spack/docker/centos-7.dockerfile @@ -9,20 +9,6 @@ ENV DOCKERFILE_BASE=centos \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ container=docker -COPY bin $SPACK_ROOT/bin -COPY etc $SPACK_ROOT/etc -COPY lib $SPACK_ROOT/lib -COPY share $SPACK_ROOT/share -COPY var $SPACK_ROOT/var -RUN mkdir -p $SPACK_ROOT/opt/spack - -RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/docker-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/interactive-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/spack-env - RUN yum update -y \ && yum install -y epel-release \ && yum update -y \ @@ -50,6 +36,20 @@ RUN yum update -y \ && rm -rf /var/cache/yum \ && yum clean all +COPY bin $SPACK_ROOT/bin +COPY etc $SPACK_ROOT/etc +COPY lib $SPACK_ROOT/lib +COPY share $SPACK_ROOT/share +COPY var $SPACK_ROOT/var +RUN mkdir -p $SPACK_ROOT/opt/spack + +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + RUN mkdir -p /root/.spack \ && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ /root/.spack/modules.yaml \ diff --git a/share/spack/docker/ubuntu-1604.dockerfile b/share/spack/docker/ubuntu-1604.dockerfile index 1f7db8bea9..c07cde5918 100644 --- a/share/spack/docker/ubuntu-1604.dockerfile +++ b/share/spack/docker/ubuntu-1604.dockerfile @@ -9,20 +9,6 @@ ENV DOCKERFILE_BASE=ubuntu:16.04 \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ container=docker -COPY bin $SPACK_ROOT/bin -COPY etc $SPACK_ROOT/etc -COPY lib $SPACK_ROOT/lib -COPY share $SPACK_ROOT/share -COPY var $SPACK_ROOT/var -RUN mkdir -p $SPACK_ROOT/opt/spack - -RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/docker-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/interactive-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/spack-env - RUN apt-get -yqq update \ && apt-get -yqq install --no-install-recommends \ build-essential \ @@ -48,6 +34,20 @@ RUN apt-get -yqq update \ && pip3 install boto3 \ && rm -rf /var/lib/apt/lists/* +COPY bin $SPACK_ROOT/bin +COPY etc $SPACK_ROOT/etc +COPY lib $SPACK_ROOT/lib +COPY share $SPACK_ROOT/share +COPY var $SPACK_ROOT/var +RUN mkdir -p $SPACK_ROOT/opt/spack + +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + # Add LANG default to en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 ENV LANG en_US.UTF-8 diff --git a/share/spack/docker/ubuntu-1804.dockerfile b/share/spack/docker/ubuntu-1804.dockerfile index a8d9577b66..1ecef10652 100644 --- a/share/spack/docker/ubuntu-1804.dockerfile +++ b/share/spack/docker/ubuntu-1804.dockerfile @@ -9,20 +9,6 @@ ENV DOCKERFILE_BASE=ubuntu \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ container=docker -COPY bin $SPACK_ROOT/bin -COPY etc $SPACK_ROOT/etc -COPY lib $SPACK_ROOT/lib -COPY share $SPACK_ROOT/share -COPY var $SPACK_ROOT/var -RUN mkdir -p $SPACK_ROOT/opt/spack - -RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/docker-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/interactive-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/spack-env - RUN apt-get -yqq update \ && apt-get -yqq install --no-install-recommends \ build-essential \ @@ -48,6 +34,20 @@ RUN apt-get -yqq update \ && pip3 install boto3 \ && rm -rf /var/lib/apt/lists/* +COPY bin $SPACK_ROOT/bin +COPY etc $SPACK_ROOT/etc +COPY lib $SPACK_ROOT/lib +COPY share $SPACK_ROOT/share +COPY var $SPACK_ROOT/var +RUN mkdir -p $SPACK_ROOT/opt/spack + +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + # Add LANG default to en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 ENV LANG en_US.UTF-8 |