Detect the arch so we pull in the right 3rd party software via github
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 29s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m10s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
Deon George 2024-10-14 08:08:54 +11:00
parent 086907edfb
commit a17722df77

View File

@ -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 RUN apk add --no-cache nginx nginx-mod-mail bash
# Add acme-lego Certbot # Add acme-lego Certbot
ENV LEGOVER=v4.14.2 ENV LEGOVER=v4.19.2
RUN curl -sL https://github.com/go-acme/lego/releases/download/${LEGOVER}/lego_${LEGOVER}_linux_amd64.tar.gz | tar -C /usr/sbin -xzf - 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 # Configuration
COPY etc/nginx/nginx.conf /etc/nginx COPY etc/nginx/nginx.conf /etc/nginx
@ -33,5 +36,5 @@ COPY var/www/maintenance /var/www/maintenance
# Starting # Starting
EXPOSE 80 443 25 110 143 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" ] ENTRYPOINT [ "/sbin/init-docker" ]