From de9f0d53e6f6fbc022aa82de44927fe09e5078bb Mon Sep 17 00:00:00 2001 From: chao sun Date: Tue, 16 Jan 2024 10:02:43 +1100 Subject: [PATCH] Clean up the PR and remove comments change of debian12 PR --- debian12/Dockerfile | 42 +++++++++++++++++++++++++++++++++++------- debian12/root/Procfile | 2 +- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/debian12/Dockerfile b/debian12/Dockerfile index 1ddee16..7802705 100644 --- a/debian12/Dockerfile +++ b/debian12/Dockerfile @@ -6,11 +6,11 @@ # Mongo support # -FROM debian:12 +FROM debian:bookworm # Component Versions ENV \ - BASHCONTAINER_VERSION=0.8.0 BASHCONTAINER_SHA256=0ddc93b11fd8d6ac67f6aefbe4ba790550fc98444e051e461330f10371a877f1 \ + BASHCONTAINER_VERSION=0.7.2 BASHCONTAINER_SHA256=87c4b804f0323d8f0856cb4fbf2f7859174765eccc8b0ac2d99b767cecdcf5c6 \ PHPEXTRAS_VERSION=0.1.0 PHPEXTRAS_SHA256=515af5789d5180123acfac9b1090f46e07f355c8df51a34e27ada5f7da0495cc # Change the www-data use to uid and gid 48 to match other containers @@ -38,9 +38,9 @@ RUN set -x \ # Install gomplate RUN set -x \ - && GOMPLATE_VERSION=v3.11.6 \ - && GOMPLATE_CHECKSUM_X86_64=7ce8f9f89a0b21fac05b8412af4dd8a06f9e5d8a2df70370549d2dde5f9f0d75 \ - && GOMPLATE_CHECKSUM_AARCH64=f41b6cfaebd9c744c3091993baf9ca44cd80e07d63143d2e78457a159fc22dc5 \ + && GOMPLATE_VERSION=v3.11.5 \ + && GOMPLATE_CHECKSUM_X86_64=16f6a01a0ff22cae1302980c42ce4f98ca20f8c55443ce5a8e62e37fc23487b3 \ + && GOMPLATE_CHECKSUM_AARCH64=fd980f9d233902e50f3f03f10ea65f36a2705385358a87aa18b19fb7cdf54c1d \ && if [ "$(uname -m)" = "x86_64" ] ; then \ GOMPLATE_CHECKSUM="${GOMPLATE_CHECKSUM_X86_64}"; \ GOMPLATE_ARCH="amd64"; \ @@ -55,6 +55,34 @@ RUN set -x \ && rm -f /tmp/* \ ; +# Install s6 +RUN set -x \ + && S6_VERSION=2.11.0.0 \ + && EXECLINE_VERSION=2.8.1.0 \ + && SKAWARE_RELEASE=2.0.7 \ + && S6_CHECKSUM_X86_64=fcf79204c1957016fc88b0ad7d98f150071483583552103d5822cbf56824cc87 \ + && S6_CHECKSUM_AARCH64=64151e136f887c6c2c7df69e3100573c318ec7400296680cc698bc7b0ca36943 \ + && EXECLINE_CHECKSUM_X86_64=b216cfc4db928729d950df5a354aa34bc529e8250b55ab0de700193693dea682 \ + && EXECLINE_CHECKSUM_AARCH64=8cb1d5c2d44cb94990d63023db48f7d3cd71ead10cbb19c05b99dbd528af5748 \ + && if [ "$(uname -m)" = "x86_64" ] ; then \ + S6_CHECKSUM="${S6_CHECKSUM_X86_64}"; \ + EXECLINE_CHECKSUM="${EXECLINE_CHECKSUM_X86_64}"; \ + SKAWARE_ARCH="amd64"; \ + elif [ "$(uname -m)" = "aarch64" ]; then \ + S6_CHECKSUM="${S6_CHECKSUM_AARCH64}"; \ + EXECLINE_CHECKSUM="${EXECLINE_CHECKSUM_AARCH64}"; \ + SKAWARE_ARCH="aarch64"; \ + fi \ + && curl -sSf -L -o /tmp/s6-${S6_VERSION}-linux-${SKAWARE_ARCH}-bin.tar.gz https://github.com/just-containers/skaware/releases/download/v${SKAWARE_RELEASE}/s6-${S6_VERSION}-linux-${SKAWARE_ARCH}-bin.tar.gz \ + && curl -sSf -L -o /tmp/execline-${EXECLINE_VERSION}-linux-${SKAWARE_ARCH}-bin.tar.gz https://github.com/just-containers/skaware/releases/download/v${SKAWARE_RELEASE}/execline-${EXECLINE_VERSION}-linux-${SKAWARE_ARCH}-bin.tar.gz \ + && echo "${S6_CHECKSUM} s6-${S6_VERSION}-linux-${SKAWARE_ARCH}-bin.tar.gz" > /tmp/SHA256SUM \ + && echo "${EXECLINE_CHECKSUM} execline-${EXECLINE_VERSION}-linux-${SKAWARE_ARCH}-bin.tar.gz" >> /tmp/SHA256SUM \ + && ( cd /tmp; sha256sum -c SHA256SUM || ( echo "Expected S6: $(sha256sum s6-${S6_VERSION}-linux-${SKAWARE_ARCH}-bin.tar.gz) Execline: $(sha256sum execline-${EXECLINE_VERSION}-linux-${SKAWARE_ARCH}-bin.tar.gz)"; exit 1; )) \ + && tar -C /usr/local -zxf /tmp/s6-${S6_VERSION}-linux-${SKAWARE_ARCH}-bin.tar.gz \ + && tar -C /usr/local -zxf /tmp/execline-${EXECLINE_VERSION}-linux-${SKAWARE_ARCH}-bin.tar.gz \ + && rm -rf /tmp/* \ + ; + # Install PHP Extras RUN set -x \ && if ! command -v wget > /dev/null; then \ @@ -78,7 +106,7 @@ RUN set -x \ RUN \ export DEBIAN_FRONTEND=noninteractive && \ apt-get update && \ - apt-get install --no-install-recommends --no-install-suggests -y wget curl ca-certificates git gnupg openssh-client msmtp-mta apache2 libapache2-mod-xsendfile imagemagick ghostscript s6 \ + apt-get install --no-install-recommends --no-install-suggests -y wget curl ca-certificates git gnupg openssh-client msmtp-mta apache2 libapache2-mod-xsendfile imagemagick ghostscript \ php8.2-apcu \ php8.2-cli \ php8.2-curl \ @@ -132,4 +160,4 @@ RUN \ ENV TMPDIR=/var/tmp TERM=dumb EXPOSE 8000 ENTRYPOINT ["/entry.sh"] -CMD ["s6"] +CMD ["s6"] \ No newline at end of file diff --git a/debian12/root/Procfile b/debian12/root/Procfile index 6316389..b8cd429 100644 --- a/debian12/root/Procfile +++ b/debian12/root/Procfile @@ -1 +1 @@ -s6: /usr/bin/s6-svscan /etc/s6 +s6: /usr/local/bin/s6-svscan /etc/s6