diff --git a/docker/alpine.Dockerfile b/docker/alpine.Dockerfile index 36f9f40a5..f36660f32 100644 --- a/docker/alpine.Dockerfile +++ b/docker/alpine.Dockerfile @@ -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 diff --git a/docker/bionic-asan-clang.Dockerfile b/docker/bionic-asan-clang.Dockerfile index dfdbd086a..a53249fa4 100644 --- a/docker/bionic-asan-clang.Dockerfile +++ b/docker/bionic-asan-clang.Dockerfile @@ -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 diff --git a/docker/bionic-tsan-clang.Dockerfile b/docker/bionic-tsan-clang.Dockerfile index 9efb0eb6d..4e105021c 100644 --- a/docker/bionic-tsan-clang.Dockerfile +++ b/docker/bionic-tsan-clang.Dockerfile @@ -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 diff --git a/docker/bionic-tsan.Dockerfile b/docker/bionic-tsan.Dockerfile index 1ee2f2d86..3ef16a917 100644 --- a/docker/bionic-tsan.Dockerfile +++ b/docker/bionic-tsan.Dockerfile @@ -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 diff --git a/docker/bionic.Dockerfile b/docker/bionic.Dockerfile index 4cab03585..05694550a 100644 --- a/docker/bionic.Dockerfile +++ b/docker/bionic.Dockerfile @@ -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 diff --git a/docker/centos7.Dockerfile b/docker/centos7.Dockerfile index 2286e6700..663ccd98a 100644 --- a/docker/centos7.Dockerfile +++ b/docker/centos7.Dockerfile @@ -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 \ diff --git a/docker/centos8.Dockerfile b/docker/centos8.Dockerfile index 741dc2433..3ab81ff17 100644 --- a/docker/centos8.Dockerfile +++ b/docker/centos8.Dockerfile @@ -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 diff --git a/docker/fedora.Dockerfile b/docker/fedora.Dockerfile index 65f6d9528..9d48ccb40 100644 --- a/docker/fedora.Dockerfile +++ b/docker/fedora.Dockerfile @@ -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 diff --git a/docker/focal-32bit.Dockerfile b/docker/focal-32bit.Dockerfile index bf5bd2b10..228fece30 100644 --- a/docker/focal-32bit.Dockerfile +++ b/docker/focal-32bit.Dockerfile @@ -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 \ diff --git a/docker/xenial.Dockerfile b/docker/xenial.Dockerfile index 9e374f662..a0b7896d7 100644 --- a/docker/xenial.Dockerfile +++ b/docker/xenial.Dockerfile @@ -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.