2025-01-10 17:54:09 +01:00
|
|
|
FROM nginx:1.27.3-alpine
|
2020-03-24 17:18:37 +01:00
|
|
|
|
2020-04-30 14:27:40 +02:00
|
|
|
# Install required software
|
2021-12-16 17:27:32 +01:00
|
|
|
RUN apk update && \
|
2020-05-04 13:35:21 +02:00
|
|
|
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
|
2020-11-09 15:20:04 +01:00
|
|
|
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
|
2023-05-29 16:46:07 +02:00
|
|
|
COPY ./discover_my_public_ip.sh ./update_enterprise_ha_nodes.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-11-09 16:29:35 +01:00
|
|
|
mkdir -p /custom-nginx && \
|
2020-04-30 14:27:40 +02:00
|
|
|
chmod +x /usr/local/bin/entrypoint.sh && \
|
2023-05-29 16:46:07 +02:00
|
|
|
chmod +x /usr/local/bin/discover_my_public_ip.sh && \
|
|
|
|
chmod +x /usr/local/bin/update_enterprise_ha_nodes.sh
|
2020-03-24 17:18:37 +01:00
|
|
|
|
2021-12-16 17:27:32 +01:00
|
|
|
CMD [ "/usr/local/bin/entrypoint.sh" ]
|