Skip to content

Commit

Permalink
Add mid layer to reduce dependence on exact gcc version from bootstra…
Browse files Browse the repository at this point in the history
…p debian
  • Loading branch information
alecbcs committed Jun 19, 2024
1 parent c95eb11 commit 026819e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
FROM docker.io/debian:12.5 as base
FROM docker.io/debian:12.5 as bootstrap

RUN apt-get update && apt-get install -y \
build-essential \
ca-certificates \
git \
libc6-dev \
python3

RUN git clone -c feature.manyFiles=true https://github.com/spack/spack.git

ENV PATH="${PATH}:/spack/bin"

COPY spack.yaml /root/spack-env/spack.yaml

RUN ./spack/bin/spack -e /root/spack-env -k --fail-fast install
RUN /spack/bin/spack -e /root/spack-env concretize
RUN /spack/bin/spack -e /root/spack-env install --fail-fast
RUN /spack/bin/spack view symlink /bootstrap-view $(/spack/bin/spack find -H)


FROM docker.io/debian:12.5 as base

COPY --from=bootstrap /spack /spack
COPY --from=bootstrap /bootstrap-view /bootstrap-view
COPY spack.yaml /root/spack-env/spack.yaml

ENV PATH="/bootstrap-view/bin:/spack/bin:${PATH}"

RUN spack -e /root/spack-env concretize -f
RUN spack -e /root/spack-env install --fail-fast
RUN spack gc -e /root/spack-env -y

FROM docker.io/debian:12.5-slim

Expand Down
2 changes: 1 addition & 1 deletion spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
spack:
specs:
- coreutils
- gcc@12.2.0+binutils
- gcc+binutils
- git
- gmake
- patch
Expand Down

0 comments on commit 026819e

Please sign in to comment.