Fix up Dockerfiles

The Dockerfiles had bitrotted some.

Get them passing again, add libpcre2-dev where we can so we aren't
hitting more servers than necessary, and reformat the bionic files so
they can share more of the same image.
This commit is contained in:
ridiculousfish 2022-10-23 11:30:26 -07:00
parent 180acbbb27
commit c3274c3579
10 changed files with 67 additions and 25 deletions

View file

@ -3,7 +3,19 @@ FROM alpine:3.13
ENV LANG C.UTF-8 ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8 ENV LC_ALL C.UTF-8
RUN apk add bash cmake g++ gettext-dev git libintl musl-dev ncurses-dev ninja python3 py3-pexpect RUN apk add --no-cache \
bash \
cmake \
g++ \
gettext-dev \
git \
libintl \
musl-dev \
ncurses-dev \
ninja \
pcre2-dev \
python3 \
py3-pexpect
RUN addgroup -g 1000 fishuser RUN addgroup -g 1000 fishuser

View file

@ -2,11 +2,6 @@ FROM ubuntu:18.04
ENV LANG C.UTF-8 ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8 ENV LC_ALL C.UTF-8
ENV CXXFLAGS="-fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address" \
CC=clang-9 \
CXX=clang++-9 \
ASAN_OPTIONS=check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1 \
UBSAN_OPTIONS=print_stacktrace=1:report_error_type=1
RUN apt-get update \ RUN apt-get update \
&& apt-get -y install \ && apt-get -y install \
@ -16,12 +11,14 @@ RUN apt-get update \
gettext \ gettext \
git \ git \
libncurses5-dev \ libncurses5-dev \
libpcre2-dev \
locales \ locales \
ninja-build \ ninja-build \
python3 \ python3 \
python3-pexpect \ python3-pexpect \
sudo \ sudo \
&& locale-gen en_US.UTF-8 && locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -g 1000 fishuser \ RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \ && useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
@ -35,4 +32,10 @@ WORKDIR /home/fishuser
COPY fish_run_tests.sh / COPY fish_run_tests.sh /
ENV CXXFLAGS="-fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address" \
CC=clang-9 \
CXX=clang++-9 \
ASAN_OPTIONS=check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1 \
UBSAN_OPTIONS=print_stacktrace=1:report_error_type=1
CMD /fish_run_tests.sh CMD /fish_run_tests.sh

View file

@ -2,7 +2,6 @@ FROM ubuntu:18.04
ENV LANG C.UTF-8 ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8 ENV LC_ALL C.UTF-8
ENV CXXFLAGS="-fsanitize=thread" CC=clang-9 CXX=clang++-9
RUN apt-get update \ RUN apt-get update \
&& apt-get -y install \ && apt-get -y install \
@ -12,12 +11,14 @@ RUN apt-get update \
gettext \ gettext \
git \ git \
libncurses5-dev \ libncurses5-dev \
libpcre2-dev \
locales \ locales \
ninja-build \ ninja-build \
python3 \ python3 \
python3-pexpect \ python3-pexpect \
sudo \ sudo \
&& locale-gen en_US.UTF-8 && locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -g 1000 fishuser \ RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \ && useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
@ -31,4 +32,5 @@ WORKDIR /home/fishuser
COPY fish_run_tests.sh / COPY fish_run_tests.sh /
ENV CXXFLAGS="-fsanitize=thread" CC=clang-9 CXX=clang++-9
CMD /fish_run_tests.sh CMD /fish_run_tests.sh

View file

@ -2,21 +2,23 @@ FROM ubuntu:18.04
ENV LANG C.UTF-8 ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8 ENV LC_ALL C.UTF-8
ENV CXXFLAGS "-fsanitize=thread"
RUN apt-get update \ RUN apt-get update \
&& apt-get -y install \ && apt-get -y install \
build-essential \ build-essential \
cmake \ cmake \
clang-9 \
gettext \ gettext \
git \ git \
libncurses5-dev \ libncurses5-dev \
libpcre2-dev \
locales \ locales \
ninja-build \ ninja-build \
python3 \ python3 \
python3-pexpect \ python3-pexpect \
sudo \ sudo \
&& locale-gen en_US.UTF-8 && locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -g 1000 fishuser \ RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \ && useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
@ -30,4 +32,5 @@ WORKDIR /home/fishuser
COPY fish_run_tests.sh / COPY fish_run_tests.sh /
ENV CXXFLAGS "-fsanitize=thread"
CMD /fish_run_tests.sh CMD /fish_run_tests.sh

View file

@ -7,15 +7,18 @@ RUN apt-get update \
&& apt-get -y install \ && apt-get -y install \
build-essential \ build-essential \
cmake \ cmake \
clang-9 \
gettext \ gettext \
git \ git \
libncurses5-dev \ libncurses5-dev \
libpcre2-dev \
locales \ locales \
ninja-build \ ninja-build \
python3 \ python3 \
python3-pexpect \ python3-pexpect \
sudo \ sudo \
&& locale-gen en_US.UTF-8 && locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -g 1000 fishuser \ RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \ && useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
@ -29,4 +32,5 @@ WORKDIR /home/fishuser
COPY fish_run_tests.sh / COPY fish_run_tests.sh /
CMD /fish_run_tests.sh CMD /fish_run_tests.sh

View file

@ -10,7 +10,9 @@ RUN yum install --assumeyes epel-release https://repo.ius.io/ius-release-el7.rpm
ninja-build \ ninja-build \
python3 \ python3 \
openssl \ openssl \
sudo pcre2-devel \
sudo \
&& yum clean all
# cmake is called "cmake3" on centos7. # cmake is called "cmake3" on centos7.
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake \ RUN ln -s /usr/bin/cmake3 /usr/bin/cmake \

View file

@ -1,5 +1,12 @@
FROM centos:8 FROM centos:8
# See https://stackoverflow.com/questions/70963985/error-failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal
RUN cd /etc/yum.repos.d/ && \
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
# install powertools to get ninja-build # install powertools to get ninja-build
RUN dnf -y install dnf-plugins-core \ RUN dnf -y install dnf-plugins-core \
&& dnf config-manager --set-enabled powertools \ && dnf config-manager --set-enabled powertools \
@ -13,7 +20,9 @@ RUN dnf -y install dnf-plugins-core \
ninja-build \ ninja-build \
python3 \ python3 \
openssl \ openssl \
sudo pcre2-devel \
sudo \
&& yum clean all
RUN pip3 install pexpect RUN pip3 install pexpect

View file

@ -2,14 +2,18 @@ FROM fedora:latest
RUN dnf install --assumeyes \ RUN dnf install --assumeyes \
cmake \ cmake \
diffutils \
gcc-c++ \ gcc-c++ \
git-core \ git-core \
ncurses-devel \ ncurses-devel \
ninja-build \ ninja-build \
pcre2-devel \
python3 \ python3 \
python3-pip \ python3-pip \
openssl \ openssl \
sudo procps \
sudo && \
dnf clean all
RUN pip3 install pexpect RUN pip3 install pexpect

View file

@ -19,7 +19,8 @@ RUN apt-get update \
python3 \ python3 \
python3-pexpect \ python3-pexpect \
sudo \ sudo \
&& locale-gen en_US.UTF-8 && locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -g 1000 fishuser \ RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \ && useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \

View file

@ -10,12 +10,14 @@ RUN apt-get update \
gettext \ gettext \
git \ git \
libncurses5-dev \ libncurses5-dev \
libpcre2-dev \
locales \ locales \
ninja-build \ ninja-build \
python3 \ python3 \
python3-pip \ python3-pip \
sudo \ sudo \
&& locale-gen en_US.UTF-8 && locale-gen en_US.UTF-8 \
&& apt-get clean
# The python3-pexpect package on Xenial doesn't allow delaybeforesend to be None. # The python3-pexpect package on Xenial doesn't allow delaybeforesend to be None.
# Install pexpect with pip which is newer. # Install pexpect with pip which is newer.