2019-12-04 15:19:17 +00:00
FROM nginx:1.17.6-alpine
2017-11-01 01:21:12 +00:00
LABEL maintainer = "Jason Wilder mail@jasonwilder.com"
2016-09-01 15:29:25 +00:00
# Install wget and install/updates certificates
RUN apk add --no-cache --virtual .run-deps \
2017-01-12 05:21:39 +00:00
ca-certificates bash wget openssl \
2016-09-01 15:29:25 +00:00
&& update-ca-certificates
2017-06-14 22:31:12 +00:00
2016-09-01 15:29:25 +00:00
# Configure Nginx and apply fix for very long server names
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \
2017-06-13 01:11:27 +00:00
&& sed -i 's/worker_processes 1/worker_processes auto/' /etc/nginx/nginx.conf
2016-09-01 15:29:25 +00:00
# Install Forego
ADD https://github.com/jwilder/forego/releases/download/v0.16.1/forego /usr/local/bin/forego
RUN chmod u+x /usr/local/bin/forego
2018-01-14 22:28:46 +00:00
ENV DOCKER_GEN_VERSION 0.7.4
2016-09-01 15:29:25 +00:00
RUN wget --quiet https://github.com/jwilder/docker-gen/releases/download/$DOCKER_GEN_VERSION /docker-gen-alpine-linux-amd64-$DOCKER_GEN_VERSION .tar.gz \
&& tar -C /usr/local/bin -xvzf docker-gen-alpine-linux-amd64-$DOCKER_GEN_VERSION .tar.gz \
&& rm /docker-gen-alpine-linux-amd64-$DOCKER_GEN_VERSION .tar.gz
2018-03-07 21:36:05 +00:00
COPY network_internal.conf /etc/nginx/
2016-09-01 15:29:25 +00:00
COPY . /app/
WORKDIR /app/
ENV DOCKER_HOST unix:///tmp/docker.sock
2017-01-12 04:04:24 +00:00
VOLUME [ "/etc/nginx/certs" , "/etc/nginx/dhparam" ]
2016-09-01 15:29:25 +00:00
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]
CMD [ "forego" , "start" , "-r" ]