Skip to content

Commit fd11e1b

Browse files
committed
Add libc from base container
1 parent 66c0b9f commit fd11e1b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ ENV PATH="${PATH}:/spack/bin"
1414
COPY spack.yaml /root/spack-env/spack.yaml
1515

1616
RUN spack compiler find
17+
1718
RUN sed -i '/spec: gcc/s/$/ build_type=Release/' /root/.spack/packages.yaml
19+
RUN sed -i '/gcc.*+strip/s/+strip/~strip/' /root/spack-env/spack.yaml
1820

1921
RUN spack -e /root/spack-env concretize
2022
RUN spack -e /root/spack-env fetch -D
@@ -35,6 +37,7 @@ ENV PATH="/bootstrap-view/bin:/spack/bin:${PATH}"
3537
COPY spack.yaml /root/spack-env/spack.yaml
3638

3739
RUN spack compiler find /bootstrap-view/bin
40+
RUN sed -i '/spec: gcc/s/$/ ~strip/' /root/.spack/packages.yaml
3841

3942
RUN spack -e /root/spack-env concretize -Uf
4043
RUN spack -e /root/spack-env install --fail-fast --fresh
@@ -45,17 +48,21 @@ RUN spack gc -e /root/spack-env -y
4548
FROM scratch
4649

4750
COPY --from=base /spack /spack
48-
COPY --from=base /view /usr
51+
COPY --from=base /view /view
4952
COPY --from=base /python-view /python-view
5053

54+
COPY --from=base /usr/lib /usr/lib/
55+
COPY --from=base /usr/include /usr/include
56+
5157
ENV SPACK_PYTHON=/python-view/bin/python3
52-
ENV PATH=/usr/bin:/spack/bin
58+
ENV PATH=/view/bin:/spack/bin
5359

54-
SHELL ["/usr/bin/bash", "-c"]
60+
SHELL ["/view/bin/bash", "-c"]
5561

56-
RUN ln -s /usr/bin /bin
62+
RUN ln -s /view/bin /usr/bin
63+
RUN ln -s /view/bin /bin
5764

5865
RUN spack compiler find
5966
RUN spack bootstrap now
6067

61-
ENTRYPOINT ["/usr/bin/bash", "-l", "-c"]
68+
ENTRYPOINT ["/view/bin/bash", "-l", "-c"]

0 commit comments

Comments
 (0)