From e1b3218655da3730b52d7d68c484f05873dd6bad Mon Sep 17 00:00:00 2001 From: fbjorn Date: Fri, 4 Apr 2025 13:24:54 +0300 Subject: [PATCH 1/3] Update parse-template --- nginx-base/alpine-nginx/Dockerfile | 6 +++--- python-base/ubuntu22.04-python3.11-nginx/Dockerfile | 4 ++-- .../ubuntu22.04-python3.11-nginx/docker/base-prepare.sh | 2 +- python-base/ubuntu24.04-python3.13-nginx/Dockerfile | 4 ++-- .../ubuntu24.04-python3.13-nginx/docker/base-prepare.sh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nginx-base/alpine-nginx/Dockerfile b/nginx-base/alpine-nginx/Dockerfile index 08e02173..d76e3218 100644 --- a/nginx-base/alpine-nginx/Dockerfile +++ b/nginx-base/alpine-nginx/Dockerfile @@ -1,13 +1,13 @@ FROM nginx:stable-alpine -ENV PARSE_TEMPLATE_VERSION=v1.0.0 \ - PARSE_TEMPLATE_HASH=8d1dc39e701b938f4874f3f8130cd3a324e7fa4697af36541918f9398dd61223 +ENV PARSE_TEMPLATE_VERSION=v1.0.1 \ + PARSE_TEMPLATE_HASH=dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b RUN set -exu \ && apk update \ && apk upgrade --available \ && apk add --virtual build-deps curl \ - && curl -L -o /usr/bin/parse-template https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template-linux-amd64 \ + && curl -L -o /usr/bin/parse-template https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_x86_64 \ && echo "${PARSE_TEMPLATE_HASH} /usr/bin/parse-template" | sha256sum -c \ && chmod +x /usr/bin/parse-template \ && mkdir -p /run/nginx/ \ diff --git a/python-base/ubuntu22.04-python3.11-nginx/Dockerfile b/python-base/ubuntu22.04-python3.11-nginx/Dockerfile index 82745931..f9ca10f2 100644 --- a/python-base/ubuntu22.04-python3.11-nginx/Dockerfile +++ b/python-base/ubuntu22.04-python3.11-nginx/Dockerfile @@ -2,8 +2,8 @@ ARG LOCAL_REGISTRY="" FROM ${LOCAL_REGISTRY}python-base:ubuntu22.04-python3.11 ENV \ - PARSE_TEMPLATE_HASH="8d1dc39e701b938f4874f3f8130cd3a324e7fa4697af36541918f9398dd61223" \ - PARSE_TEMPLATE_VERSION="v1.0.0" \ + PARSE_TEMPLATE_HASH="dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b" \ + PARSE_TEMPLATE_VERSION="v1.0.1" \ ENV_LAST_LINE="LEAVE-ME-HERE" # Run docker/base-prepare.sh diff --git a/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh b/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh index 6f39138f..c7e0e509 100644 --- a/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh +++ b/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh @@ -22,7 +22,7 @@ apt-get install -y --no-install-recommends \ # Install parse-template curl -L -o /usr/bin/parse-template \ - "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template-linux-amd64" + "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_x86_64" echo "${PARSE_TEMPLATE_HASH} /usr/bin/parse-template" | sha256sum -c chmod +x /usr/bin/parse-template diff --git a/python-base/ubuntu24.04-python3.13-nginx/Dockerfile b/python-base/ubuntu24.04-python3.13-nginx/Dockerfile index 19de1671..f2761783 100644 --- a/python-base/ubuntu24.04-python3.13-nginx/Dockerfile +++ b/python-base/ubuntu24.04-python3.13-nginx/Dockerfile @@ -2,8 +2,8 @@ ARG LOCAL_REGISTRY="" FROM ${LOCAL_REGISTRY}python-base:ubuntu24.04-python3.13 ENV \ - PARSE_TEMPLATE_HASH="8d1dc39e701b938f4874f3f8130cd3a324e7fa4697af36541918f9398dd61223" \ - PARSE_TEMPLATE_VERSION="v1.0.0" \ + PARSE_TEMPLATE_HASH="dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b" \ + PARSE_TEMPLATE_VERSION="v1.0.1" \ ENV_LAST_LINE="LEAVE-ME-HERE" # Run docker/base-prepare.sh diff --git a/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh b/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh index 6f39138f..c7e0e509 100644 --- a/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh +++ b/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh @@ -22,7 +22,7 @@ apt-get install -y --no-install-recommends \ # Install parse-template curl -L -o /usr/bin/parse-template \ - "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template-linux-amd64" + "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_x86_64" echo "${PARSE_TEMPLATE_HASH} /usr/bin/parse-template" | sha256sum -c chmod +x /usr/bin/parse-template From 2cbb670d5f9c7e4ddd44fbcc1860049b9fb441e6 Mon Sep 17 00:00:00 2001 From: fbjorn Date: Fri, 11 Apr 2025 11:50:26 +0300 Subject: [PATCH 2/3] Enhance parse-template installation for multi-architecture support --- nginx-base/alpine-nginx/Dockerfile | 15 ++++++++++++--- .../ubuntu22.04-python3.11-nginx/Dockerfile | 3 ++- .../docker/base-prepare.sh | 12 ++++++++++-- .../ubuntu24.04-python3.13-nginx/Dockerfile | 3 ++- .../docker/base-prepare.sh | 12 ++++++++++-- 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/nginx-base/alpine-nginx/Dockerfile b/nginx-base/alpine-nginx/Dockerfile index d76e3218..cb75f02d 100644 --- a/nginx-base/alpine-nginx/Dockerfile +++ b/nginx-base/alpine-nginx/Dockerfile @@ -1,14 +1,23 @@ FROM nginx:stable-alpine ENV PARSE_TEMPLATE_VERSION=v1.0.1 \ - PARSE_TEMPLATE_HASH=dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b + PARSE_TEMPLATE_HASH_X86_64="dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b" \ + PARSE_TEMPLATE_HASH_ARM64="d305ac32e970bf12572e67e5aa09e202b2b49279a4aaa81000bb7ae94b179648" RUN set -exu \ && apk update \ && apk upgrade --available \ && apk add --virtual build-deps curl \ - && curl -L -o /usr/bin/parse-template https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_x86_64 \ - && echo "${PARSE_TEMPLATE_HASH} /usr/bin/parse-template" | sha256sum -c \ + && if [ "$(uname -m)" = "x86_64" ]; then \ + curl -L -o /usr/bin/parse-template "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_x86_64" && \ + echo "${PARSE_TEMPLATE_HASH_X86_64} /usr/bin/parse-template" | sha256sum -c; \ + elif [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then \ + curl -L -o /usr/bin/parse-template "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_arm64" && \ + echo "${PARSE_TEMPLATE_HASH_ARM64} /usr/bin/parse-template" | sha256sum -c; \ + else \ + echo "Unsupported architecture: $(uname -m)" && \ + exit 1; \ + fi \ && chmod +x /usr/bin/parse-template \ && mkdir -p /run/nginx/ \ && apk del build-deps \ diff --git a/python-base/ubuntu22.04-python3.11-nginx/Dockerfile b/python-base/ubuntu22.04-python3.11-nginx/Dockerfile index f9ca10f2..83dee942 100644 --- a/python-base/ubuntu22.04-python3.11-nginx/Dockerfile +++ b/python-base/ubuntu22.04-python3.11-nginx/Dockerfile @@ -2,7 +2,8 @@ ARG LOCAL_REGISTRY="" FROM ${LOCAL_REGISTRY}python-base:ubuntu22.04-python3.11 ENV \ - PARSE_TEMPLATE_HASH="dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b" \ + PARSE_TEMPLATE_HASH_X86_64="dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b" \ + PARSE_TEMPLATE_HASH_ARM64="d305ac32e970bf12572e67e5aa09e202b2b49279a4aaa81000bb7ae94b179648" \ PARSE_TEMPLATE_VERSION="v1.0.1" \ ENV_LAST_LINE="LEAVE-ME-HERE" diff --git a/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh b/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh index c7e0e509..951ba8a0 100644 --- a/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh +++ b/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh @@ -21,9 +21,17 @@ apt-get install -y --no-install-recommends \ # This line is intentionally empty to preserve trailing \ in previous list # Install parse-template +ARCH=$(uname -m) curl -L -o /usr/bin/parse-template \ - "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_x86_64" -echo "${PARSE_TEMPLATE_HASH} /usr/bin/parse-template" | sha256sum -c + "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_${ARCH}" +if [ "${ARCH}" = "x86_64" ]; then + echo "${PARSE_TEMPLATE_HASH_X86_64} /usr/bin/parse-template" | sha256sum -c +elif [ "${ARCH}" = "arm64" ] || [ "${ARCH}" = "aarch64" ]; then + echo "${PARSE_TEMPLATE_HASH_ARM64} /usr/bin/parse-template" | sha256sum -c +else + echo "Unsupported architecture: ${ARCH}" + exit 1 +fi chmod +x /usr/bin/parse-template # --------------- diff --git a/python-base/ubuntu24.04-python3.13-nginx/Dockerfile b/python-base/ubuntu24.04-python3.13-nginx/Dockerfile index f2761783..6e3a4c40 100644 --- a/python-base/ubuntu24.04-python3.13-nginx/Dockerfile +++ b/python-base/ubuntu24.04-python3.13-nginx/Dockerfile @@ -2,7 +2,8 @@ ARG LOCAL_REGISTRY="" FROM ${LOCAL_REGISTRY}python-base:ubuntu24.04-python3.13 ENV \ - PARSE_TEMPLATE_HASH="dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b" \ + PARSE_TEMPLATE_HASH_X86_64="dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b" \ + PARSE_TEMPLATE_HASH_ARM64="d305ac32e970bf12572e67e5aa09e202b2b49279a4aaa81000bb7ae94b179648" \ PARSE_TEMPLATE_VERSION="v1.0.1" \ ENV_LAST_LINE="LEAVE-ME-HERE" diff --git a/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh b/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh index c7e0e509..951ba8a0 100644 --- a/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh +++ b/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh @@ -21,9 +21,17 @@ apt-get install -y --no-install-recommends \ # This line is intentionally empty to preserve trailing \ in previous list # Install parse-template +ARCH=$(uname -m) curl -L -o /usr/bin/parse-template \ - "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_x86_64" -echo "${PARSE_TEMPLATE_HASH} /usr/bin/parse-template" | sha256sum -c + "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_${ARCH}" +if [ "${ARCH}" = "x86_64" ]; then + echo "${PARSE_TEMPLATE_HASH_X86_64} /usr/bin/parse-template" | sha256sum -c +elif [ "${ARCH}" = "arm64" ] || [ "${ARCH}" = "aarch64" ]; then + echo "${PARSE_TEMPLATE_HASH_ARM64} /usr/bin/parse-template" | sha256sum -c +else + echo "Unsupported architecture: ${ARCH}" + exit 1 +fi chmod +x /usr/bin/parse-template # --------------- From 167bc427d3df25c6789c7e41a5ca19cce8c4e980 Mon Sep 17 00:00:00 2001 From: fbjorn Date: Fri, 11 Apr 2025 11:54:30 +0300 Subject: [PATCH 3/3] Improve conditions --- .../ubuntu22.04-python3.11-nginx/docker/base-prepare.sh | 6 ++++-- .../ubuntu24.04-python3.13-nginx/docker/base-prepare.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh b/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh index 951ba8a0..5332e4ae 100644 --- a/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh +++ b/python-base/ubuntu22.04-python3.11-nginx/docker/base-prepare.sh @@ -22,11 +22,13 @@ apt-get install -y --no-install-recommends \ # Install parse-template ARCH=$(uname -m) -curl -L -o /usr/bin/parse-template \ - "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_${ARCH}" if [ "${ARCH}" = "x86_64" ]; then + curl -L -o /usr/bin/parse-template \ + "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_x86_64" echo "${PARSE_TEMPLATE_HASH_X86_64} /usr/bin/parse-template" | sha256sum -c elif [ "${ARCH}" = "arm64" ] || [ "${ARCH}" = "aarch64" ]; then + curl -L -o /usr/bin/parse-template \ + "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_arm64" echo "${PARSE_TEMPLATE_HASH_ARM64} /usr/bin/parse-template" | sha256sum -c else echo "Unsupported architecture: ${ARCH}" diff --git a/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh b/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh index 951ba8a0..5332e4ae 100644 --- a/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh +++ b/python-base/ubuntu24.04-python3.13-nginx/docker/base-prepare.sh @@ -22,11 +22,13 @@ apt-get install -y --no-install-recommends \ # Install parse-template ARCH=$(uname -m) -curl -L -o /usr/bin/parse-template \ - "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_${ARCH}" if [ "${ARCH}" = "x86_64" ]; then + curl -L -o /usr/bin/parse-template \ + "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_x86_64" echo "${PARSE_TEMPLATE_HASH_X86_64} /usr/bin/parse-template" | sha256sum -c elif [ "${ARCH}" = "arm64" ] || [ "${ARCH}" = "aarch64" ]; then + curl -L -o /usr/bin/parse-template \ + "https://github.com/cocreators-ee/parse-template/releases/download/${PARSE_TEMPLATE_VERSION}/parse-template_Linux_arm64" echo "${PARSE_TEMPLATE_HASH_ARM64} /usr/bin/parse-template" | sha256sum -c else echo "Unsupported architecture: ${ARCH}"