From a17722df778c85f45d9b95b8eeb656e7517ee44c Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 14 Oct 2024 08:08:54 +1100 Subject: [PATCH] Detect the arch so we pull in the right 3rd party software via github --- docker/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index c304324..70fc45b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,8 +9,11 @@ RUN if [ -n "${HTTP_PROXY}" ] ; then echo "Using HTTP PROXY [${HTTP_PROXY}]" && RUN apk add --no-cache nginx nginx-mod-mail bash # Add acme-lego Certbot -ENV LEGOVER=v4.14.2 -RUN curl -sL https://github.com/go-acme/lego/releases/download/${LEGOVER}/lego_${LEGOVER}_linux_amd64.tar.gz | tar -C /usr/sbin -xzf - +ENV LEGOVER=v4.19.2 +RUN <<-EOF + export ARCH=$(sh -c "([ \"`uname -m`\" = \"x86_64\" ] && echo amd64) || ([ \"`uname -m`\" = \"aarch64\" ] && echo arm64) || echo unknown") + curl -sL https://github.com/go-acme/lego/releases/download/${LEGOVER}/lego_${LEGOVER}_linux_${ARCH}.tar.gz | tar -C /usr/sbin -xzf - +EOF # Configuration COPY etc/nginx/nginx.conf /etc/nginx @@ -33,5 +36,5 @@ COPY var/www/maintenance /var/www/maintenance # Starting EXPOSE 80 443 25 110 143 -LABEL cron.container.weekly root#/usr/sbin/ssl.sh lego renew +LABEL cron.container.weekly="root#/usr/sbin/ssl.sh lego renew" ENTRYPOINT [ "/sbin/init-docker" ]