This repository has been archived by the owner on Mar 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
62 lines (61 loc) · 1.81 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM alpine:3.7 AS src
ENV NGINX_VERSION 1.12.2
ENV OPENSSL_VERSION 1.0.2n
RUN apk add --update \
curl \
gcc \
libc-dev \
linux-headers \
make \
pcre-dev \
perl \
zlib-dev
WORKDIR /src/openssl
ADD https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz .
RUN tar -zxvf openssl-$OPENSSL_VERSION.tar.gz --strip-components 1
WORKDIR /src/nginx
ADD https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz .
RUN tar -zxvf nginx-$NGINX_VERSION.tar.gz --strip-components 1
RUN ./configure \
--prefix=/etc/nginx \
--user=root \
--group=wheel \
--http-client-body-temp-path=/var/cache/nginx/client_temp \
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
--with-openssl=/src/openssl \
--with-threads \
--with-file-aio \
--without-http_autoindex_module \
--without-http_browser_module \
--without-http_empty_gif_module \
--without-http_fastcgi_module \
--without-http_geo_module \
--without-http_limit_conn_module \
--without-http_map_module \
--without-http_memcached_module \
--without-http_referer_module \
--without-http_scgi_module \
--without-http_split_clients_module \
--without-http_ssi_module \
--with-http_ssl_module \
--without-http_userid_module \
--without-http_uwsgi_module \
--with-http_v2_module \
--without-mail_imap_module \
--without-mail_pop3_module \
--without-mail_smtp_module \
--with-stream \
--without-stream_geo_module \
--without-stream_limit_conn_module \
--without-stream_map_module \
--without-stream_split_clients_module \
--with-stream_ssl_module \
--with-ld-opt='-static' \
${SSL_OPT}
RUN make -j1
RUN strip /src/nginx/objs/nginx
FROM scratch
COPY --from=src /src/nginx/objs/nginx /nginx
VOLUME ["/etc/nginx/conf"]
CMD ["-h"]
ENTRYPOINT ["/nginx"]