2016-08-22 02:11:35 +00:00
|
|
|
# NAME leenooks/nginx
|
|
|
|
# VERSION latest
|
|
|
|
|
2022-06-01 10:47:43 +00:00
|
|
|
FROM php:fpm-alpine
|
|
|
|
RUN apk add nginx nginx-mod-mail bash
|
|
|
|
|
|
|
|
EXPOSE 80 443 25 110 143
|
|
|
|
|
|
|
|
# Add acme-lego Certbot
|
|
|
|
RUN curl -sL https://github.com/go-acme/lego/releases/download/v4.6.0/lego_v4.6.0_linux_amd64.tar.gz | tar -C /usr/local/sbin -xzf -
|
2016-08-22 02:11:35 +00:00
|
|
|
|
2022-06-01 10:47:43 +00:00
|
|
|
RUN mv /sbin/init /sbin/init.busybox
|
|
|
|
COPY init /sbin/
|
|
|
|
|
|
|
|
#RUN apt-get update && apt-get install certbot -yy \
|
|
|
|
# && rm -rf /var/lib/apt/lists/* /tmp/*
|
2016-08-22 02:11:35 +00:00
|
|
|
|
2019-05-16 05:10:04 +00:00
|
|
|
# Add Cloudflare Certbot
|
2022-06-01 10:47:43 +00:00
|
|
|
#RUN apt-get update && apt-get install python3-certbot-dns-cloudflare -yy \
|
|
|
|
# && rm -rf /var/lib/apt/lists/* /tmp/*
|
2019-05-16 05:10:04 +00:00
|
|
|
|
2022-06-01 10:47:43 +00:00
|
|
|
COPY etc/nginx/nginx.conf /etc/nginx
|
|
|
|
COPY etc/nginx/default.d /etc/nginx/default.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
|
2020-12-07 00:43:03 +00:00
|
|
|
|
2022-06-01 10:47:43 +00:00
|
|
|
COPY var/www/maintenance /var/www/maintenance
|
|
|
|
COPY www.conf /usr/local/etc/php-fpm.d/
|
2016-08-22 02:11:35 +00:00
|
|
|
|
2021-02-12 01:19:34 +00:00
|
|
|
COPY ssl.sh /usr/local/sbin/
|
2021-02-12 01:16:37 +00:00
|
|
|
LABEL cron.container.weekly root#/usr/local/sbin/ssl.sh lego renew
|
2017-11-20 06:01:00 +00:00
|
|
|
|
2022-06-01 10:47:43 +00:00
|
|
|
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
|
2016-08-22 02:11:35 +00:00
|
|
|
# Expose our web root and log directories log.
|
2022-06-01 10:47:43 +00:00
|
|
|
#VOLUME [ "/etc/nginx/conf.d", "/etc/nginx/default.d", "/etc/nginx/include.d" ]
|
2016-08-22 02:11:35 +00:00
|
|
|
|
|
|
|
# Starting
|
2022-06-01 10:47:43 +00:00
|
|
|
ENTRYPOINT [ "/sbin/init" ]
|