Debian Codegraph @

examples/Dockerfile.almalinux_9ch

raw
1 # ch-test-scope: standard
2 FROM almalinux:9
3
4 # This image has three purposes: (1) demonstrate we can build a AlmaLinux 8
5 # image, (2) provide a build environment for Charliecloud EPEL 8 RPMs, and (3)
6 # provide image packages necessary for Obspy and Paraview.
7 #
8 # Quirks:
9 #
10 # 1. Install the dnf ovl plugin to work around RPMDB corruption when
11 # building images with Docker and the OverlayFS storage driver.
12 #
13 # 2. Enable PowerTools repo, because some packages in EPEL depend on it.
14 #
15 # 3. Install packages needed to build el8 rpms.
16 #
17 # 4. Issue #1103: Install libarchive to resolve cmake bug
18 #
19 # 5. AlmaLinux lost their GPG key, so manual intervention is required to
20 # install current packages [1].
21 #
22 # [1]: https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
23 RUN rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux-9
24 RUN dnf install -y --setopt=install_weak_deps=false \
25 epel-release \
26 'dnf-command(config-manager)'
27 RUN dnf config-manager --enable crb
28 RUN dnf install -y --setopt=install_weak_deps=false \
29 autoconf \
30 automake \
31 gcc \
32 git \
33 libarchive \
34 libpng-devel \
35 make \
36 python3 \
37 python3-devel \
38 python3-lark-parser \
39 python3-pip \
40 python3-requests \
41 python3-sphinx \
42 python3-sphinx_rtd_theme \
43 rpm-build \
44 rpmlint \
45 rsync \
46 squashfs-tools \
47 squashfuse \
48 wget \
49 which \
50 && dnf clean all
51
52 # Need wheel to install bundled Lark, and the RPM version doesn’t work.
53 RUN pip3 install wheel
54
55 # AlmaLinux's linker doesn’t search these paths by default; add them because we
56 # will install stuff later into /usr/local.
57 RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/usrlocal.conf \
58 && echo "/usr/local/lib64" >> /etc/ld.so.conf.d/usrlocal.conf \
59 && ldconfig
60
61 # Install ImageMagick
62 # The latest, 7.1.0, fails to install with a cryptic libtool error. ¯\_(ツ)_/¯
63 ARG MAGICK_VERSION=7.0.11-14
64 RUN wget -nv -O ImageMagick-${MAGICK_VERSION}.tar.gz \
65 "https://github.com/ImageMagick/ImageMagick/archive/refs/tags/${MAGICK_VERSION}.tar.gz" \
66 && tar xf ImageMagick-${MAGICK_VERSION}.tar.gz \
67 && cd ImageMagick-${MAGICK_VERSION} \
68 && ./configure --prefix=/usr/local \
69 && make -j $(getconf _NPROCESSORS_ONLN) install \
70 && rm -Rf ../ImageMagick-${MAGICK_VERSION}
71
72 # Add mount points for files and directories for paraview and obspy comparison
73 # tests.
74 RUN mkdir /diff \
75 && echo "example bind mount file" > /a.png \
76 && echo "example bind mount file" > /b.png