-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (22 loc) · 820 Bytes
/
Dockerfile
File metadata and controls
23 lines (22 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#Download latest Nginx server boilerplate configs, static config and dummy certificate
FROM debian:stretch-slim as downloader
WORKDIR /server-configs-nginx
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
ca-certificates; \
git clone https://github.com/h5bp/server-configs-nginx.git .; \
sed -i /\ keepalive_timeout\ /s/^/\ \ #/ nginx.conf;
COPY static.conf dummy.conf conf.d/templates/
#Install Nginx config
FROM nginx
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends inotify-tools; \
apt-get clean; \
rm -rf /var/lib/apt/lists/ /etc/nginx/;
COPY --from=downloader /server-configs-nginx /etc/nginx
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]