docker/Dockerfile_almalinux_8.erb (69 lines of code) (raw):
FROM almalinux:8 as ruby-image
RUN yum update -y -q \
&& yum install -y 'dnf-command(config-manager)' epel-release \
&& yum config-manager --set-enabled powertools \
&& yum install -y \
autoconf \
gcc \
gcc-c++ \
git \
make \
curl \
libyaml-devel \
zlib-devel \
openssl-devel \
glibc-locale-source \
&& yum clean all
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
<%= Snippets.new(include: %w[versions rust ruby]).populate %>
FROM ruby-image as builder
# Install required packages
RUN yum update -y -q \
&& yum remove -y -q git \
&& yum install -y -q \
autoconf \
automake \
clang-devel \
curl-devel \
expat-devel \
gettext-devel \
krb5-devel \
perl-devel \
libffi-devel \
libgcrypt-devel \
readline-devel \
gdbm-devel \
ninja-build \
ncurses-devel \
bzip2 \
which \
byacc \
libgpg-error-devel \
libassuan-devel \
ccache \
unzip \
openssh-clients \
rpm-build \
rpm-sign \
libstdc++-static \
python3 \
file \
selinux-policy-devel \
perl-IPC-Cmd
# We are building pinentry-tty because CentOS 8's pinenetry package expose
# only the ncurses frontend, not tty. This, for some reason, does not work
# with rpmsign.
ENV PINENTRY_VERSION 1.1.0
RUN curl -fsSL "https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-${PINENTRY_VERSION}.tar.bz2" \
| tar -jxC /tmp \
&& cd /tmp/pinentry-${PINENTRY_VERSION} \
&& ./configure --disable-pinentry-gtk2 --disable-pinentry-gnome --disable-pinentry-qt --disable-pinentry-curses --enable-pinentry-tty --prefix=/usr \
&& make \
&& make install
<%= Snippets.new(fips: fips, exclude: %w[rust ruby]).populate %>
<%= Snippets.new(fips: fips, include: %w[meson-legacy]).populate %>
FROM almalinux:8
MAINTAINER GitLab Inc. <support@gitlab.com>
COPY --from=builder / /