2016-10-04 09:32:47 +02:00
|
|
|
FROM nginx:stable
|
|
|
|
MAINTAINER Yaltik - Fabien Bourgeois <fabien@yaltik.com>
|
|
|
|
|
|
|
|
# Default variables
|
2020-05-13 11:27:10 +02:00
|
|
|
ENV NGINX_HOST localhost 127.0.0.1
|
|
|
|
ENV NGINX_PORT 80
|
|
|
|
ENV NGINX_SSL_PORT 443
|
2016-10-04 09:32:47 +02:00
|
|
|
|
|
|
|
# Create sensible CERTS
|
|
|
|
RUN mkdir /etc/nginx/certs
|
|
|
|
COPY req.pem cert.key dhparams.pem /etc/nginx/certs/
|
|
|
|
#
|
|
|
|
# Clean, copy templates and usefull files
|
|
|
|
RUN rm /etc/nginx/conf.d/*
|
|
|
|
COPY launch.sh /launch.sh
|
|
|
|
RUN mkdir /etc/nginx/templates
|
|
|
|
COPY root.conf /etc/nginx/templates/
|
|
|
|
|
|
|
|
# Dot not daemonize nginx
|
|
|
|
RUN echo 'daemon off;' >> /etc/nginx/nginx.conf
|
|
|
|
|
|
|
|
CMD bash /launch.sh
|