-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
36 lines (28 loc) · 1005 Bytes
/
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
FROM alpine:3.2
MAINTAINER Loïc Mahieu <[email protected]>
ENV NGINX_VERSION nginx-1.9.12
RUN apk --update add openssl-dev pcre-dev zlib-dev wget build-base && \
mkdir -p /tmp/src && \
cd /tmp/src && \
wget http://nginx.org/download/${NGINX_VERSION}.tar.gz && \
tar -zxvf ${NGINX_VERSION}.tar.gz && \
cd /tmp/src/${NGINX_VERSION} && \
./configure \
--with-http_ssl_module \
--with-http_gzip_static_module \
--prefix=/etc/nginx \
--http-log-path=/var/log/nginx/access.log \
--error-log-path=/var/log/nginx/error.log \
--sbin-path=/usr/local/sbin/nginx && \
make && \
make install && \
apk del build-base && \
rm -rf /tmp/src && \
rm -rf /var/cache/apk/*
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
VOLUME ["/var/log/nginx"]
WORKDIR /etc/nginx
EXPOSE 80 443
CMD ["nginx", "-g", "daemon off;"]