• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1ARG ubuntu_version=22.04
2ARG gcc_version=10.3.0
3FROM ghcr.io/rse-ops/gcc-ubuntu-${ubuntu_version}:gcc-${gcc_version}
4
5# docker build -t ghcr.io/woodard/libabigail-ubuntu-22.04 .
6
7# Install Libabigail to its own view
8WORKDIR /opt/abigail-env
9RUN . /opt/spack/share/spack/setup-env.sh && \
10    spack env create -d . && \
11    spack env activate . && \
12    spack add libabigail@master  && \
13    spack --debug install
14
15# Prepare a source extraction of libabigail at /src (intended to be overwritten by user)
16COPY . /src
17
18# Second run - should have deps cached
19RUN . /opt/spack/share/spack/setup-env.sh && \
20
21    # This adds metadata for libabigail to spack.yaml
22    spack develop --path /src libabigail@master && \
23    spack --debug install
24    # At this point you can spack install, and bind the code to /code to develop
25
26# ensure libabigail stuffs always on the path
27RUN cd /opt/abigail-env && \
28    spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh
29
30ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l", "-c"]
31