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 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

View File

@ -2,11 +2,6 @@ FROM ubuntu:18.04
ENV LANG 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 \
&& apt-get -y install \
@ -16,12 +11,14 @@ RUN apt-get update \
gettext \
git \
libncurses5-dev \
libpcre2-dev \
locales \
ninja-build \
python3 \
python3-pexpect \
sudo \
&& locale-gen en_US.UTF-8
&& locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -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 /
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

View File

@ -2,7 +2,6 @@ FROM ubuntu:18.04
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV CXXFLAGS="-fsanitize=thread" CC=clang-9 CXX=clang++-9
RUN apt-get update \
&& apt-get -y install \
@ -12,12 +11,14 @@ RUN apt-get update \
gettext \
git \
libncurses5-dev \
libpcre2-dev \
locales \
ninja-build \
python3 \
python3-pexpect \
sudo \
&& locale-gen en_US.UTF-8
&& locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -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 /
ENV CXXFLAGS="-fsanitize=thread" CC=clang-9 CXX=clang++-9
CMD /fish_run_tests.sh

View File

@ -2,21 +2,23 @@ FROM ubuntu:18.04
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV CXXFLAGS "-fsanitize=thread"
RUN apt-get update \
&& apt-get -y install \
build-essential \
cmake \
clang-9 \
gettext \
git \
libncurses5-dev \
libpcre2-dev \
locales \
ninja-build \
python3 \
python3-pexpect \
sudo \
&& locale-gen en_US.UTF-8
&& locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -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 /
ENV CXXFLAGS "-fsanitize=thread"
CMD /fish_run_tests.sh

View File

@ -7,15 +7,18 @@ RUN apt-get update \
&& apt-get -y install \
build-essential \
cmake \
clang-9 \
gettext \
git \
libncurses5-dev \
libpcre2-dev \
locales \
ninja-build \
python3 \
python3-pexpect \
sudo \
&& locale-gen en_US.UTF-8
&& locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -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 /
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 \
python3 \
openssl \
sudo
pcre2-devel \
sudo \
&& yum clean all
# cmake is called "cmake3" on centos7.
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake \

View File

@ -1,5 +1,12 @@
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
RUN dnf -y install dnf-plugins-core \
&& dnf config-manager --set-enabled powertools \
@ -13,7 +20,9 @@ RUN dnf -y install dnf-plugins-core \
ninja-build \
python3 \
openssl \
sudo
pcre2-devel \
sudo \
&& yum clean all
RUN pip3 install pexpect

View File

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

View File

@ -19,7 +19,8 @@ RUN apt-get update \
python3 \
python3-pexpect \
sudo \
&& locale-gen en_US.UTF-8
&& locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -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 \
git \
libncurses5-dev \
libpcre2-dev \
locales \
ninja-build \
python3 \
python3-pip \
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.
# Install pexpect with pip which is newer.