-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
37 lines (27 loc) · 1.09 KB
/
Dockerfile
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
31
32
33
34
35
36
37
#FROM nginx
FROM debian:jessie
LABEL maintainer="superpoussin22"
ENV LANG C.UTF-8 \
ENV FORWARD_PORT=80
ENV FORWARD_HOST=web
RUN apt-get update; apt-get install -y \
openssl nginx nginx-extras gettext
RUN rm -rf /etc/nginx/conf.d/*; \
rm -f /etc/nginx/sites-available/default; \
mkdir -p /etc/nginx/external/pki
RUN sed -i 's/access_log.*/access_log \/dev\/stdout;/g' /etc/nginx/nginx.conf; \
sed -i 's/error_log.*/error_log \/dev\/stdout info;/g' /etc/nginx/nginx.conf; \
sed -i 's/^pid/daemon off;\npid/g' /etc/nginx/nginx.conf; \
sed -i 's/ssl_protocols/#ssl_protocols/' /etc/nginx/nginx.conf; \
sed -i 's/ssl_prefer_server_ciphers on;/#ssl_prefer_server_ciphers on;/' /etc/nginx/nginx.conf
#ADD ./conf/basic.conf /etc/nginx/conf.d/basic.conf
#ADD ./conf/ssl.conf /etc/nginx/conf.d/ssl.conf
#ADD ./auth.htpasswd /etc/nginx/auth.htpasswd
#ADD ./conf/auth.conf /opt/auth.conf
ADD entrypoint.sh /opt/entrypoint.sh
RUN chmod a+x /opt/entrypoint.sh
#create cache directory
RUN mkdir -p /data/nginx/cache
RUN rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/opt/entrypoint.sh"]
CMD ["nginx"]