-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_nginx
30 lines (21 loc) · 977 Bytes
/
Dockerfile_nginx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM debian:11
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
nginx-full libnginx-mod-http-fancyindex libnginx-mod-http-dav-ext \
libnginx-mod-http-lua luarocks lua-ljsyscall lua-penlight \
&& apt-get autoremove && apt-get clean
RUN mkdir -p /mnt/data && mkdir /mnt/tmp && chmod -R a+rwx /mnt
# redirect logs to stdout/err
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
# remove default handler
RUN rm /etc/nginx/sites-enabled/default
# copy in new default config
COPY nginx_config/nginx_default.conf /etc/nginx/nginx.conf
# override this for customization (listen port, auth proxy, health)
COPY nginx_config/auth.conf /etc/nginx/custom/auth.conf
COPY nginx_config/health.conf /etc/nginx/sites-enabled/health.conf
# set umask
RUN echo '#!/bin/sh\numask 002\nexec $@' >> /opt/entrypoint.sh && \
chmod +x /opt/entrypoint.sh
ENTRYPOINT ["/opt/entrypoint.sh"]
CMD ["nginx"]