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" ]