Update lego

This commit is contained in:
Deon George 2024-01-24 21:26:42 +11:00
parent 74d0628b00
commit dc7c3edf21

View File

@ -9,17 +9,20 @@ RUN if [ -n ${HTTP_PROXY} ] ; then sed -i -e s'/https/http/' /etc/apk/repositori
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.12.3 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 - RUN curl -sL https://github.com/go-acme/lego/releases/download/${LEGOVER}/lego_${LEGOVER}_linux_amd64.tar.gz | tar -C /usr/sbin -xzf -
# Configuration # Configuration
COPY etc/nginx/nginx.conf /etc/nginx COPY etc/nginx/nginx.conf /etc/nginx
COPY etc/nginx/default.d /etc/nginx/default.d COPY etc/nginx/default.d /etc/nginx/default.d
COPY etc/nginx/include.d /etc/nginx/include.d COPY etc/nginx/include.d /etc/nginx/include.d
RUN chmod 444 /etc/nginx/default.d/ssl/* && chmod 400 /etc/nginx/default.d/ssl/default.key /etc/nginx/default.d/ssl/dhparams.pem RUN chmod 444 /etc/nginx/default.d/ssl/* && \
chmod 400 /etc/nginx/default.d/ssl/default.key /etc/nginx/default.d/ssl/dhparams.pem
# Default SSL cert # Default SSL cert
RUN mkdir -p /etc/nginx/conf.d/ssl && ln -s ../../default.d/ssl/default.crt /etc/nginx/conf.d/ssl/mail.crt && ln -s ../../default.d/ssl/default.key /etc/nginx/conf.d/ssl/mail.key RUN mkdir -p /etc/nginx/conf.d/ssl && \
ln -s ../../default.d/ssl/default.crt /etc/nginx/conf.d/ssl/mail.crt && \
ln -s ../../default.d/ssl/default.key /etc/nginx/conf.d/ssl/mail.key
COPY ssl.sh /usr/sbin/ COPY ssl.sh /usr/sbin/
COPY init-docker /sbin/ COPY init-docker /sbin/