-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
36 lines (30 loc) · 1.1 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
FROM evild/alpine-base:1.0.0
MAINTAINER Dominique HAAS <contact@dominique-haas.fr>
ENV NGINX_VERSION nginx-1.9.12
RUN apk --no-cache 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 \
--with-http_v2_module \
--with-ipv6 \
--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
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
VOLUME ["/var/log/nginx"]
# Add the files
ADD root /
# Expose the ports for nginx
EXPOSE 80 443