diff --git a/.clusterfuzzlite/Dockerfile b/.clusterfuzzlite/Dockerfile index d6eb48f7..8f1ebd9b 100644 --- a/.clusterfuzzlite/Dockerfile +++ b/.clusterfuzzlite/Dockerfile @@ -22,10 +22,11 @@ FROM gcr.io/oss-fuzz-base/base-builder:v1@sha256:92851d384e2525f2b8c63922994610de685438778883987a50a3509f0bf08917 -RUN git clone --depth 1 https://github.com/openwall/john.git /upstream -RUN apt-get update -qq && \ - apt-get install -y --no-install-recommends libssl-dev=* zlib1g-dev=* && \ - apt-get install -y --no-install-recommends libgmp-dev=* libpcap-dev=* libbz2-dev=* \ +RUN git clone --depth 1 https://github.com/openwall/john.git /upstream \ + && apt-get update -qq \ + && apt-get install -y --no-install-recommends \ + libbz2-dev=* libgmp-dev=* libpcap-dev=* \ + libssl-dev=* zlib1g-dev=* \ # ================================================================== # Clean up the image (shrink the Docker image) # ------------------------------------------------------------------ @@ -35,4 +36,6 @@ RUN apt-get update -qq && \ WORKDIR $SRC/john COPY .clusterfuzzlite/build.sh $SRC/ COPY scripts/helper.sh /upstream + +USER tester HEALTHCHECK NONE diff --git a/CI/Dockerfiles/Dockerfile.FedoraLatest b/CI/Dockerfiles/Dockerfile.FedoraLatest index 0359827c..053ea808 100644 --- a/CI/Dockerfiles/Dockerfile.FedoraLatest +++ b/CI/Dockerfiles/Dockerfile.FedoraLatest @@ -30,8 +30,10 @@ RUN dnf -y -q update \ @development-tools openssl-devel gmp-devel libpcap-devel bzip2-devel wget \ clang libasan libubsan libtsan american-fuzzy-lop zzuf pocl-devel \ american-fuzzy-lop-clang \ - && useradd -U -m JtR + && useradd -U -m tester -USER JtR ENV BASE fedora -CMD /bin/bash +CMD [ "/bin/bash" ] + +USER tester +HEALTHCHECK NONE diff --git a/CI/Dockerfiles/Dockerfile.OpenCL b/CI/Dockerfiles/Dockerfile.OpenCL index c6b2ae08..4c560490 100644 --- a/CI/Dockerfiles/Dockerfile.OpenCL +++ b/CI/Dockerfiles/Dockerfile.OpenCL @@ -27,17 +27,19 @@ LABEL org.opencontainers.image.source="https://github.com/openwall/john-packages RUN apt-get update -qq \ && export DEBIAN_FRONTEND="noninteractive" \ - && apt-get install -y \ - build-essential libssl-dev yasm libgmp-dev libpcap-dev pkg-config debhelper libnet1-dev \ - libbz2-dev wget llvm libomp-dev zlib1g-dev git clang afl++ zzuf \ - libpocl-dev ocl-icd-opencl-dev ocl-icd-libopencl1 pocl-opencl-icd opencl-headers \ - && useradd -U -m JtR \ + && apt-get install -y --no-install-recommends \ + afl++ build-essential clang debhelper git libbz2-dev libgmp-dev libnet1-dev libomp-dev \ + libpcap-dev libpocl-dev libssl-dev llvm ocl-icd-libopencl1 ocl-icd-opencl-dev \ + opencl-headers pkg-config pocl-opencl-icd wget yasm zlib1g-dev zzuf \ + && useradd -U -m tester \ # ================================================================== # Clean up the image (shrink the Docker image) # ------------------------------------------------------------------ && apt-get -y clean \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* -# USER JtR => it is much better to use root on Travis -ENV BASE ubuntu -CMD /bin/bash +ENV BASE ubuntu-pocl +CMD [ "/bin/bash" ] + +USER tester +HEALTHCHECK NONE diff --git a/CI/Dockerfiles/Dockerfile.OpenCL-IntelCPU b/CI/Dockerfiles/Dockerfile.OpenCL-IntelCPU index 0785a6c9..d1033210 100644 --- a/CI/Dockerfiles/Dockerfile.OpenCL-IntelCPU +++ b/CI/Dockerfiles/Dockerfile.OpenCL-IntelCPU @@ -27,7 +27,7 @@ LABEL org.opencontainers.image.source="https://github.com/openwall/john-packages # DO NOT update this automatically. OpenCL drivers are fragile and must be maintained very carefully. # RUN apt-get update -qq \ -# && apt-get install -y \ +# && apt-get install -y --no-install-recommends \ # build-essential libssl-dev zlib1g-dev yasm libgmp-dev libpcap-dev \ # pkg-config libbz2-dev wget \ # ocl-icd-opencl-dev clinfo git \ @@ -38,11 +38,14 @@ LABEL org.opencontainers.image.source="https://github.com/openwall/john-packages # && apt-get update -qq \ # && apt-get install -y \ # intel-oneapi-runtime-opencl intel-basekit \ -# && useradd -U -m JtR \ +# && useradd -U -m tester \ # && apt-get -y clean \ # && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* # Workaround for an issue in Intel libraries installation script ENV LD_LIBRARY_PATH=/opt/intel/oneapi/2024.0/lib/:"$LD_LIBRARY_PATH" ENV BASE ubuntu -CMD /bin/bash +CMD [ "/bin/bash" ] + +USER tester +HEALTHCHECK NONE diff --git a/CI/Dockerfiles/Dockerfile.RHUbi8 b/CI/Dockerfiles/Dockerfile.RHUbi8 index cf84abd8..3f5445f3 100644 --- a/CI/Dockerfiles/Dockerfile.RHUbi8 +++ b/CI/Dockerfiles/Dockerfile.RHUbi8 @@ -28,7 +28,11 @@ LABEL org.opencontainers.image.source="https://github.com/openwall/john-packages RUN yum -y -q update \ && yum -y install \ openssl-devel gmp-devel libpcap-devel bzip2-devel wget gcc git perl \ - && useradd -U -m JtR + && yum clean all \ + && useradd -U -m tester ENV BASE RedHat-UBI -CMD /bin/bash +CMD [ "/bin/bash" ] + +USER tester +HEALTHCHECK NONE \ No newline at end of file diff --git a/CI/Dockerfiles/Dockerfile.UbuntuDevel b/CI/Dockerfiles/Dockerfile.UbuntuDevel index 92fed6b1..7eab6060 100644 --- a/CI/Dockerfiles/Dockerfile.UbuntuDevel +++ b/CI/Dockerfiles/Dockerfile.UbuntuDevel @@ -27,16 +27,18 @@ LABEL org.opencontainers.image.source="https://github.com/openwall/john-packages RUN apt-get update -qq \ && export DEBIAN_FRONTEND="noninteractive" \ - && apt-get install -y \ - build-essential libssl-dev yasm libgmp-dev libpcap-dev pkg-config debhelper libnet1-dev \ - libbz2-dev wget llvm libomp-dev zlib1g-dev git clang \ - && useradd -U -m JtR \ + && apt-get install -y --no-install-recommends \ + build-essential clang debhelper git libbz2-dev libgmp-dev libnet1-dev \ + libomp-dev libpcap-dev libssl-dev llvm pkg-config wget yasm zlib1g-dev \ + && useradd -U -m tester \ # ================================================================== # Clean up the image (shrink the Docker image) # ------------------------------------------------------------------ && apt-get -y clean \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* -# USER JtR => it is much better to use root on Travis ENV BASE ubuntu -CMD /bin/bash +CMD [ "/bin/bash" ] + +USER tester +HEALTHCHECK NONE diff --git a/CI/Dockerfiles/Dockerfile.UbuntuRolling b/CI/Dockerfiles/Dockerfile.UbuntuRolling index 537ae8c3..8a0064a6 100644 --- a/CI/Dockerfiles/Dockerfile.UbuntuRolling +++ b/CI/Dockerfiles/Dockerfile.UbuntuRolling @@ -27,17 +27,18 @@ LABEL org.opencontainers.image.source="https://github.com/openwall/john-packages RUN apt-get update -qq \ && export DEBIAN_FRONTEND="noninteractive" \ - && apt-get install -y \ - build-essential libssl-dev yasm libgmp-dev libpcap-dev pkg-config debhelper libnet1-dev \ - libbz2-dev wget llvm libomp-dev zlib1g-dev git clang \ - libusb-1.0-0-dev \ - && useradd -U -m JtR \ + && apt-get install -y --no-install-recommends \ + build-essential clang debhelper git libbz2-dev libgmp-dev libnet1-dev libomp-dev \ + libpcap-dev libssl-dev libusb-1.0-0-dev llvm pkg-config wget yasm zlib1g-dev \ + && useradd -U -m tester \ # ================================================================== # Clean up the image (shrink the Docker image) # ------------------------------------------------------------------ && apt-get -y clean \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* -# USER JtR => it is much better to use root on Travis ENV BASE ubuntu -CMD /bin/bash +CMD [ "/bin/bash" ] + +USER tester +HEALTHCHECK NONE \ No newline at end of file diff --git a/CI/Dockerfiles/Dockerfile.flatpak.package b/CI/Dockerfiles/Dockerfile.flatpak.package index c2c4162b..f1490da8 100644 --- a/CI/Dockerfiles/Dockerfile.flatpak.package +++ b/CI/Dockerfiles/Dockerfile.flatpak.package @@ -26,12 +26,14 @@ LABEL description="Docker images for John the Ripper CI (1.0.Fedora Latest Flatp LABEL org.opencontainers.image.source="https://github.com/openwall/john-packages" RUN dnf -y -q update \ - && dnf -y install \ + && dnf -y install \ flatpak flatpak-builder elfutils wget git \ && flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo \ && flatpak install -y flathub org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08 \ - && useradd -U -m JtR + && useradd -U -m tester -USER JtR ENV BASE fedora -CMD /bin/bash +CMD [ "/bin/bash" ] + +USER tester +HEALTHCHECK NONE \ No newline at end of file