Updated to use certbot auto

This commit is contained in:
Deon George 2018-04-10 10:22:54 +10:00
parent 194d5fe7bd
commit 831ae4aefe

View File

@ -5,9 +5,15 @@ FROM nginx:latest
COPY etc/nginx/default.d /etc/nginx/default.d COPY etc/nginx/default.d /etc/nginx/default.d
COPY var/www/maintenance /var/www/maintenance COPY var/www/maintenance /var/www/maintenance
RUN apt-get update && apt-get install certbot -yyq \ RUN apt-get update && apt-get install curl -yyq \
&& rm -rf /var/lib/apt/lists/* /tmp/* && rm -rf /var/lib/apt/lists/* /tmp/*
RUN cd /usr/local/sbin && \
curl -O https://dl.eff.org/certbot-auto && \
chmod +x certbot-auto && ./certbot-auto -n --install-only
RUN ln -s /usr/local/sbin/certbot-auto /usr/local/sbin/certbot
EXPOSE 80 443 EXPOSE 80 443
COPY renew.sh /usr/local/sbin COPY renew.sh /usr/local/sbin