diff --git a/nginx-base/alpine-nginx/Dockerfile b/nginx-base/alpine-nginx/Dockerfile index 08e02173..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.0 \ - PARSE_TEMPLATE_HASH=8d1dc39e701b938f4874f3f8130cd3a324e7fa4697af36541918f9398dd61223 +ENV PARSE_TEMPLATE_VERSION=v1.0.1 \ + 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-amd64 \ - && 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 82745931..83dee942 100644 --- a/python-base/ubuntu22.04-python3.11-nginx/Dockerfile +++ b/python-base/ubuntu22.04-python3.11-nginx/Dockerfile @@ -2,8 +2,9 @@ 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_X86_64="dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b" \ + PARSE_TEMPLATE_HASH_ARM64="d305ac32e970bf12572e67e5aa09e202b2b49279a4aaa81000bb7ae94b179648" \ + 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..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 @@ -21,9 +21,19 @@ apt-get install -y --no-install-recommends \ # This line is intentionally empty to preserve trailing \ in previous list # 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" -echo "${PARSE_TEMPLATE_HASH} /usr/bin/parse-template" | sha256sum -c +ARCH=$(uname -m) +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}" + 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 19de1671..6e3a4c40 100644 --- a/python-base/ubuntu24.04-python3.13-nginx/Dockerfile +++ b/python-base/ubuntu24.04-python3.13-nginx/Dockerfile @@ -2,8 +2,9 @@ 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_X86_64="dcfbc9e843292664aab43cd942694019ae566dc6ab83567f4339e942da76360b" \ + PARSE_TEMPLATE_HASH_ARM64="d305ac32e970bf12572e67e5aa09e202b2b49279a4aaa81000bb7ae94b179648" \ + 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..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 @@ -21,9 +21,19 @@ apt-get install -y --no-install-recommends \ # This line is intentionally empty to preserve trailing \ in previous list # 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" -echo "${PARSE_TEMPLATE_HASH} /usr/bin/parse-template" | sha256sum -c +ARCH=$(uname -m) +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}" + exit 1 +fi chmod +x /usr/bin/parse-template # ---------------