2020-04-28 15:53:56 +02:00
|
|
|
FROM nginx:1.18.0-alpine
|
2020-03-24 17:18:37 +01:00
|
|
|
|
2020-04-30 14:27:40 +02:00
|
|
|
# Install required software
|
2020-05-04 13:35:21 +02:00
|
|
|
RUN apk update && \
|
|
|
|
apk add bash \
|
|
|
|
certbot \
|
|
|
|
openssl \
|
2020-11-02 19:46:59 +01:00
|
|
|
apache2-utils \
|
|
|
|
bind-tools \
|
|
|
|
perl pcre grep && \
|
2020-04-28 15:53:56 +02:00
|
|
|
rm -rf /var/cache/apk/*
|
2020-03-24 17:18:37 +01:00
|
|
|
|
2020-03-25 12:42:26 +01:00
|
|
|
# Default nginx conf
|
|
|
|
COPY ./default.conf /etc/nginx/conf.d/default.conf
|
2020-03-27 12:53:04 +01:00
|
|
|
COPY ./default_nginx_conf /default_nginx_conf
|
2020-03-25 12:42:26 +01:00
|
|
|
|
2020-04-30 14:27:40 +02:00
|
|
|
# Entrypoint and discover public ip scripts
|
2020-05-08 12:03:34 +02:00
|
|
|
COPY ./discover_my_public_ip.sh /usr/local/bin
|
2020-11-02 19:46:59 +01:00
|
|
|
|
|
|
|
# Copy nginx.conf
|
|
|
|
COPY ./nginx.conf /etc/nginx/nginx.conf
|
|
|
|
|
|
|
|
# Entrypoint
|
2020-03-24 17:18:37 +01:00
|
|
|
COPY ./entrypoint.sh /usr/local/bin
|
2020-04-30 14:27:40 +02:00
|
|
|
|
2020-04-28 15:53:56 +02:00
|
|
|
RUN mkdir -p /var/www/certbot && \
|
2020-11-02 19:46:59 +01:00
|
|
|
mkdir -p /etc/nginx/vhost.d/ && \
|
2020-04-30 14:27:40 +02:00
|
|
|
chmod +x /usr/local/bin/entrypoint.sh && \
|
|
|
|
chmod +x /usr/local/bin/discover_my_public_ip.sh
|
2020-03-24 17:18:37 +01:00
|
|
|
|
2020-04-28 15:53:56 +02:00
|
|
|
CMD /usr/local/bin/entrypoint.sh
|