diff --git a/.github/workflows/check_blueprint.yml b/.github/workflows/check_blueprint.yml new file mode 100644 index 0000000..04cc9b0 --- /dev/null +++ b/.github/workflows/check_blueprint.yml @@ -0,0 +1,30 @@ +name: Check generated files + +on: + pull_request: + push: + +jobs: + check_blueprint: + runs-on: ubuntu-latest + name: Check that the Dockerfiles are generated from the blueprint + steps: + - uses: actions/checkout@v7 + - name: Install orbit + run: | + ORBIT_VERSION=3.3.0 + cd "$(mktemp -d)" + curl -fsSLO --retry 5 --retry-delay 2 "https://github.com/gulien/orbit/releases/download/v${ORBIT_VERSION}/orbit_Linux_x86_64.tar.gz" + curl -fsSLO --retry 5 --retry-delay 2 "https://github.com/gulien/orbit/releases/download/v${ORBIT_VERSION}/Orbit_${ORBIT_VERSION}_checksums.txt" + sha256sum -c --ignore-missing "Orbit_${ORBIT_VERSION}_checksums.txt" + tar -xzf orbit_Linux_x86_64.tar.gz orbit + sudo install orbit /usr/local/bin/orbit + - name: Regenerate the Dockerfiles + run: make blueprint + - name: Check that nothing changed + run: | + if ! git diff --quiet; then + echo "::error::The Dockerfiles are not up to date with utils/Dockerfile.blueprint, run 'make blueprint'" + git diff + exit 1 + fi diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4823e73..7dbb11c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -36,14 +36,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - uses: actions/checkout@v1 + uses: docker/setup-buildx-action@v4 + - uses: actions/checkout@v7 - name: Login to DockerHub # Merge ~ push. if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - uses: docker/login-action@v1 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/Dockerfile.20-apache-trixie b/Dockerfile.20-apache-trixie index 515c25e..0c9dacc 100644 --- a/Dockerfile.20-apache-trixie +++ b/Dockerfile.20-apache-trixie @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -52,8 +58,8 @@ RUN apt-get update \ apache2 \ && rm -rf /var/lib/apt/lists/* -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars +ENV APACHE_CONFDIR=/etc/apache2 +ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars RUN set -ex \ \ @@ -85,15 +91,15 @@ RUN set -ex \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" -ENV APACHE_DOCUMENT_ROOT / +ENV APACHE_DOCUMENT_ROOT=/ RUN { \ echo 'DirectoryIndex disabled'; \ echo 'DirectoryIndex index.html'; \ echo; \ echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ + printf '\tOptions -Indexes\n'; \ + printf '\tAllowOverride All\n'; \ echo ''; \ } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ && a2enconf nodejs @@ -121,7 +127,7 @@ RUN a2enmod rewrite RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.20-apache-trixie-build b/Dockerfile.20-apache-trixie-build index b21ab03..1843985 100644 --- a/Dockerfile.20-apache-trixie-build +++ b/Dockerfile.20-apache-trixie-build @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -52,8 +58,8 @@ RUN apt-get update \ apache2 \ && rm -rf /var/lib/apt/lists/* -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars +ENV APACHE_CONFDIR=/etc/apache2 +ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars RUN set -ex \ \ @@ -85,15 +91,15 @@ RUN set -ex \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" -ENV APACHE_DOCUMENT_ROOT / +ENV APACHE_DOCUMENT_ROOT=/ RUN { \ echo 'DirectoryIndex disabled'; \ echo 'DirectoryIndex index.html'; \ echo; \ echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ + printf '\tOptions -Indexes\n'; \ + printf '\tAllowOverride All\n'; \ echo ''; \ } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ && a2enconf nodejs @@ -121,7 +127,7 @@ RUN a2enmod rewrite RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.20-trixie b/Dockerfile.20-trixie index 38ab6eb..ba53cc4 100644 --- a/Dockerfile.20-trixie +++ b/Dockerfile.20-trixie @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -51,7 +57,7 @@ RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0. RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.20-trixie-build b/Dockerfile.20-trixie-build index b8e7eb4..36746b1 100644 --- a/Dockerfile.20-trixie-build +++ b/Dockerfile.20-trixie-build @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -51,7 +57,7 @@ RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0. RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.22-apache-trixie b/Dockerfile.22-apache-trixie index c945160..885a246 100644 --- a/Dockerfile.22-apache-trixie +++ b/Dockerfile.22-apache-trixie @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -52,8 +58,8 @@ RUN apt-get update \ apache2 \ && rm -rf /var/lib/apt/lists/* -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars +ENV APACHE_CONFDIR=/etc/apache2 +ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars RUN set -ex \ \ @@ -85,15 +91,15 @@ RUN set -ex \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" -ENV APACHE_DOCUMENT_ROOT / +ENV APACHE_DOCUMENT_ROOT=/ RUN { \ echo 'DirectoryIndex disabled'; \ echo 'DirectoryIndex index.html'; \ echo; \ echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ + printf '\tOptions -Indexes\n'; \ + printf '\tAllowOverride All\n'; \ echo ''; \ } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ && a2enconf nodejs @@ -121,7 +127,7 @@ RUN a2enmod rewrite RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.22-apache-trixie-build b/Dockerfile.22-apache-trixie-build index 2defab6..4c7c65c 100644 --- a/Dockerfile.22-apache-trixie-build +++ b/Dockerfile.22-apache-trixie-build @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -52,8 +58,8 @@ RUN apt-get update \ apache2 \ && rm -rf /var/lib/apt/lists/* -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars +ENV APACHE_CONFDIR=/etc/apache2 +ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars RUN set -ex \ \ @@ -85,15 +91,15 @@ RUN set -ex \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" -ENV APACHE_DOCUMENT_ROOT / +ENV APACHE_DOCUMENT_ROOT=/ RUN { \ echo 'DirectoryIndex disabled'; \ echo 'DirectoryIndex index.html'; \ echo; \ echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ + printf '\tOptions -Indexes\n'; \ + printf '\tAllowOverride All\n'; \ echo ''; \ } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ && a2enconf nodejs @@ -121,7 +127,7 @@ RUN a2enmod rewrite RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.22-trixie b/Dockerfile.22-trixie index d25c8be..e5836c5 100644 --- a/Dockerfile.22-trixie +++ b/Dockerfile.22-trixie @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -51,7 +57,7 @@ RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0. RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.22-trixie-build b/Dockerfile.22-trixie-build index 93454d0..36eebc4 100644 --- a/Dockerfile.22-trixie-build +++ b/Dockerfile.22-trixie-build @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -51,7 +57,7 @@ RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0. RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.24-apache-trixie b/Dockerfile.24-apache-trixie index b809621..a97f4e1 100644 --- a/Dockerfile.24-apache-trixie +++ b/Dockerfile.24-apache-trixie @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -52,8 +58,8 @@ RUN apt-get update \ apache2 \ && rm -rf /var/lib/apt/lists/* -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars +ENV APACHE_CONFDIR=/etc/apache2 +ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars RUN set -ex \ \ @@ -85,15 +91,15 @@ RUN set -ex \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" -ENV APACHE_DOCUMENT_ROOT / +ENV APACHE_DOCUMENT_ROOT=/ RUN { \ echo 'DirectoryIndex disabled'; \ echo 'DirectoryIndex index.html'; \ echo; \ echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ + printf '\tOptions -Indexes\n'; \ + printf '\tAllowOverride All\n'; \ echo ''; \ } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ && a2enconf nodejs @@ -121,7 +127,7 @@ RUN a2enmod rewrite RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.24-apache-trixie-build b/Dockerfile.24-apache-trixie-build index c707b8b..ed6b28a 100644 --- a/Dockerfile.24-apache-trixie-build +++ b/Dockerfile.24-apache-trixie-build @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -52,8 +58,8 @@ RUN apt-get update \ apache2 \ && rm -rf /var/lib/apt/lists/* -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars +ENV APACHE_CONFDIR=/etc/apache2 +ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars RUN set -ex \ \ @@ -85,15 +91,15 @@ RUN set -ex \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" -ENV APACHE_DOCUMENT_ROOT / +ENV APACHE_DOCUMENT_ROOT=/ RUN { \ echo 'DirectoryIndex disabled'; \ echo 'DirectoryIndex index.html'; \ echo; \ echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ + printf '\tOptions -Indexes\n'; \ + printf '\tAllowOverride All\n'; \ echo ''; \ } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ && a2enconf nodejs @@ -121,7 +127,7 @@ RUN a2enmod rewrite RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.24-trixie b/Dockerfile.24-trixie index d1b6d5a..100572a 100644 --- a/Dockerfile.24-trixie +++ b/Dockerfile.24-trixie @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -51,7 +57,7 @@ RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0. RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.24-trixie-build b/Dockerfile.24-trixie-build index e1b2a73..eb55467 100644 --- a/Dockerfile.24-trixie-build +++ b/Dockerfile.24-trixie-build @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -51,7 +57,7 @@ RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0. RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs diff --git a/Dockerfile.26-apache-trixie b/Dockerfile.26-apache-trixie index 1adc105..1d6c9aa 100644 --- a/Dockerfile.26-apache-trixie +++ b/Dockerfile.26-apache-trixie @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -52,8 +58,8 @@ RUN apt-get update \ apache2 \ && rm -rf /var/lib/apt/lists/* -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars +ENV APACHE_CONFDIR=/etc/apache2 +ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars RUN set -ex \ \ @@ -85,15 +91,15 @@ RUN set -ex \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" -ENV APACHE_DOCUMENT_ROOT / +ENV APACHE_DOCUMENT_ROOT=/ RUN { \ echo 'DirectoryIndex disabled'; \ echo 'DirectoryIndex index.html'; \ echo; \ echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ + printf '\tOptions -Indexes\n'; \ + printf '\tAllowOverride All\n'; \ echo ''; \ } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ && a2enconf nodejs @@ -121,7 +127,7 @@ RUN a2enmod rewrite RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_26.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs && \ diff --git a/Dockerfile.26-apache-trixie-build b/Dockerfile.26-apache-trixie-build index d9f33aa..98833a5 100644 --- a/Dockerfile.26-apache-trixie-build +++ b/Dockerfile.26-apache-trixie-build @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -52,8 +58,8 @@ RUN apt-get update \ apache2 \ && rm -rf /var/lib/apt/lists/* -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars +ENV APACHE_CONFDIR=/etc/apache2 +ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars RUN set -ex \ \ @@ -85,15 +91,15 @@ RUN set -ex \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" -ENV APACHE_DOCUMENT_ROOT / +ENV APACHE_DOCUMENT_ROOT=/ RUN { \ echo 'DirectoryIndex disabled'; \ echo 'DirectoryIndex index.html'; \ echo; \ echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ + printf '\tOptions -Indexes\n'; \ + printf '\tAllowOverride All\n'; \ echo ''; \ } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ && a2enconf nodejs @@ -121,7 +127,7 @@ RUN a2enmod rewrite RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_26.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs && \ diff --git a/Dockerfile.26-trixie b/Dockerfile.26-trixie index 31cab79..77ea121 100644 --- a/Dockerfile.26-trixie +++ b/Dockerfile.26-trixie @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -51,7 +57,7 @@ RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0. RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_26.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs && \ diff --git a/Dockerfile.26-trixie-build b/Dockerfile.26-trixie-build index 995aed9..94e00c3 100644 --- a/Dockerfile.26-trixie-build +++ b/Dockerfile.26-trixie-build @@ -2,6 +2,7 @@ FROM debian:trixie-slim LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -20,9 +21,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -51,7 +57,7 @@ RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0. RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_26.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\ apt-get update &&\ apt-get install -y --no-install-recommends nodejs && \ diff --git a/build-and-test.sh b/build-and-test.sh index 99cf24c..4834594 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -36,6 +36,20 @@ RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(> RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="whoami" -e CRON_USER_1="docker" thecodingmachine/nodejs:${TAG} sleep 1 2>&1 | grep -oP 'msg=docker' | head -n1` [[ "$RESULT" = "msg=docker" ]] +# Let's check that Apache starts and serves the files of the working directory. +if [[ $VARIANT == *apache* ]]; then + CONTAINER_ID=`docker run -d thecodingmachine/nodejs:${TAG}` + docker exec "$CONTAINER_ID" bash -c 'echo foobar > /var/www/html/index.html' + RESULT="" + for i in $(seq 1 30); do + RESULT=`docker exec "$CONTAINER_ID" curl -fs http://localhost/ || true` + [[ "$RESULT" = "foobar" ]] && break + sleep 1 + done + docker rm -f "$CONTAINER_ID" + [[ "$RESULT" = "foobar" ]] +fi + echo "Tests passed with success" if [[ "$EVENT_NAME" == "push" || "$EVENT_NAME" == "schedule" || "$EVENT_NAME" == "workflow_dispatch" ]]; then diff --git a/utils/Dockerfile.blueprint b/utils/Dockerfile.blueprint index 851a3d8..e0c2931 100644 --- a/utils/Dockerfile.blueprint +++ b/utils/Dockerfile.blueprint @@ -6,6 +6,7 @@ FROM {{ $base_image }} LABEL authors="Julien Neuhart , David Négrier " +SHELL ["/bin/bash", "-o", "pipefail", "-c"] # |-------------------------------------------------------------------------- # | Required libraries @@ -24,9 +25,14 @@ RUN apt-get update &&\ # | Supercronic is a drop-in replacement for cron (for containers). # | -RUN SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-$( dpkg --print-architecture ) \ - && SUPERCRONIC=supercronic-linux-$( dpkg --print-architecture ) \ - && curl -fsSLO "$SUPERCRONIC_URL" \ +RUN ARCH="$( dpkg --print-architecture )" \ + && SUPERCRONIC="supercronic-linux-${ARCH}" \ + && SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.49/${SUPERCRONIC}" \ + && if [ "$ARCH" = "arm64" ]; then SUPERCRONIC_SHA1SUM=0b6c5bb743e0b0dafed1132198c81807927ac413; \ + elif [ "$ARCH" = "amd64" ]; then SUPERCRONIC_SHA1SUM=e63c11a9726b775a6a11801e81af4f3fb926aa68; \ + else echo "Architecture '${ARCH}' is not supported"; exit 1; fi \ + && curl -fsSLO --retry 5 --retry-delay 2 "$SUPERCRONIC_URL" \ + && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ && chmod +x "$SUPERCRONIC" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic @@ -56,8 +62,8 @@ RUN apt-get update \ apache2 \ && rm -rf /var/lib/apt/lists/* -ENV APACHE_CONFDIR /etc/apache2 -ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars +ENV APACHE_CONFDIR=/etc/apache2 +ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars RUN set -ex \ \ @@ -89,15 +95,15 @@ RUN set -ex \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \ && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" -ENV APACHE_DOCUMENT_ROOT / +ENV APACHE_DOCUMENT_ROOT=/ RUN { \ echo 'DirectoryIndex disabled'; \ echo 'DirectoryIndex index.html'; \ echo; \ echo ''; \ - echo '\tOptions -Indexes'; \ - echo '\tAllowOverride All'; \ + printf '\tOptions -Indexes\n'; \ + printf '\tAllowOverride All\n'; \ echo ''; \ } | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \ && a2enconf nodejs @@ -124,8 +130,8 @@ RUN a2enmod rewrite RUN apt-get update &&\ apt-get install -y --no-install-recommends gnupg &&\ - {{ if lt $node_version "16" }}curl -sL https://deb.nodesource.com/setup_{{ $node_version }}.x | bash - &&\{{ else }}mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + {{ if lt $node_version "16" }}curl -sL --retry 5 --retry-delay 2 https://deb.nodesource.com/setup_{{ $node_version }}.x | bash - &&\{{ else }}mkdir -p /etc/apt/keyrings && \ + curl -fsSL --retry 5 --retry-delay 2 https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_{{ $node_version }}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\{{ end }} apt-get update &&\ apt-get install -y --no-install-recommends nodejs{{ if ge $node_version "26" }} && \