Changeset View
Changeset View
Standalone View
Standalone View
docker/nginx/Dockerfile
FROM fedora:35 | FROM fedora:35 | ||||
MAINTAINER Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> | MAINTAINER Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> | ||||
ENV container docker | ENV container docker | ||||
RUN dnf -y install \ | RUN dnf -y install \ | ||||
--setopt 'tsflags=nodocs' \ | --setopt 'tsflags=nodocs' \ | ||||
nginx \ | nginx \ | ||||
nginx-mod-mail && \ | nginx-mod-mail && \ | ||||
dnf clean all | dnf clean all | ||||
COPY nginx.conf /etc/nginx/nginx.conf | COPY nginx.conf /etc/nginx/nginx.conf | ||||
ARG APP_WEBSITE_DOMAIN | ARG APP_WEBSITE_DOMAIN | ||||
RUN sed -i -r -e "s|^.*auth_http_header.*$| auth_http_header Host services.$APP_WEBSITE_DOMAIN;|g" /etc/nginx/nginx.conf | RUN sed -i -r -e "s|APP_WEBSITE_DOMAIN|$APP_WEBSITE_DOMAIN|g" /etc/nginx/nginx.conf | ||||
# Forward request logs to Docker log collector | # Forward request logs to Docker log collector | ||||
RUN ln -sf /dev/stdout /var/log/nginx/access.log \ | RUN ln -sf /dev/stdout /var/log/nginx/access.log \ | ||||
&& ln -sf /dev/stderr /var/log/nginx/error.log | && ln -sf /dev/stderr /var/log/nginx/error.log | ||||
STOPSIGNAL SIGTERM | STOPSIGNAL SIGTERM | ||||
CMD ["nginx", "-g", "daemon off;"] | CMD ["nginx", "-g", "daemon off;"] | ||||
EXPOSE 110/tcp 143/tcp 993/tcp 995/tcp | EXPOSE 110/tcp 143/tcp 993/tcp 995/tcp |