Skip to content

Commit 43c1121

Browse files
mattrobenoltthresheek
authored andcommitted
Move CONFIG/GPG_KEYS out of image ENV vars
There's no reason for these to exist as environment variables, and CONFIG is pretty clunky and useless outside of build time. I'd argue that if someone wanted to be able to inspect this information, it could be retrieved from `nginx -V`.
1 parent d54d200 commit 43c1121

File tree

2 files changed

+90
-94
lines changed

2 files changed

+90
-94
lines changed

mainline/alpine/Dockerfile

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,51 @@ MAINTAINER NGINX Docker Maintainers "[email protected]"
44

55
ENV NGINX_VERSION 1.11.2
66

7-
ENV GPG_KEYS B0F4253373F8F6F510D42178520A9993A1C052F8
8-
ENV CONFIG "\
9-
--prefix=/etc/nginx \
10-
--sbin-path=/usr/sbin/nginx \
11-
--modules-path=/usr/lib/nginx/modules \
12-
--conf-path=/etc/nginx/nginx.conf \
13-
--error-log-path=/var/log/nginx/error.log \
14-
--http-log-path=/var/log/nginx/access.log \
15-
--pid-path=/var/run/nginx.pid \
16-
--lock-path=/var/run/nginx.lock \
17-
--http-client-body-temp-path=/var/cache/nginx/client_temp \
18-
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
19-
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
20-
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
21-
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
22-
--user=nginx \
23-
--group=nginx \
24-
--with-http_ssl_module \
25-
--with-http_realip_module \
26-
--with-http_addition_module \
27-
--with-http_sub_module \
28-
--with-http_dav_module \
29-
--with-http_flv_module \
30-
--with-http_mp4_module \
31-
--with-http_gunzip_module \
32-
--with-http_gzip_static_module \
33-
--with-http_random_index_module \
34-
--with-http_secure_link_module \
35-
--with-http_stub_status_module \
36-
--with-http_auth_request_module \
37-
--with-http_xslt_module=dynamic \
38-
--with-http_image_filter_module=dynamic \
39-
--with-http_geoip_module=dynamic \
40-
--with-http_perl_module=dynamic \
41-
--with-threads \
42-
--with-stream \
43-
--with-stream_ssl_module \
44-
--with-http_slice_module \
45-
--with-mail \
46-
--with-mail_ssl_module \
47-
--with-file-aio \
48-
--with-http_v2_module \
49-
--with-ipv6 \
50-
"
51-
52-
RUN \
53-
addgroup -S nginx \
7+
RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
8+
&& CONFIG="\
9+
--prefix=/etc/nginx \
10+
--sbin-path=/usr/sbin/nginx \
11+
--modules-path=/usr/lib/nginx/modules \
12+
--conf-path=/etc/nginx/nginx.conf \
13+
--error-log-path=/var/log/nginx/error.log \
14+
--http-log-path=/var/log/nginx/access.log \
15+
--pid-path=/var/run/nginx.pid \
16+
--lock-path=/var/run/nginx.lock \
17+
--http-client-body-temp-path=/var/cache/nginx/client_temp \
18+
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
19+
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
20+
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
21+
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
22+
--user=nginx \
23+
--group=nginx \
24+
--with-http_ssl_module \
25+
--with-http_realip_module \
26+
--with-http_addition_module \
27+
--with-http_sub_module \
28+
--with-http_dav_module \
29+
--with-http_flv_module \
30+
--with-http_mp4_module \
31+
--with-http_gunzip_module \
32+
--with-http_gzip_static_module \
33+
--with-http_random_index_module \
34+
--with-http_secure_link_module \
35+
--with-http_stub_status_module \
36+
--with-http_auth_request_module \
37+
--with-http_xslt_module=dynamic \
38+
--with-http_image_filter_module=dynamic \
39+
--with-http_geoip_module=dynamic \
40+
--with-http_perl_module=dynamic \
41+
--with-threads \
42+
--with-stream \
43+
--with-stream_ssl_module \
44+
--with-http_slice_module \
45+
--with-mail \
46+
--with-mail_ssl_module \
47+
--with-file-aio \
48+
--with-http_v2_module \
49+
--with-ipv6 \
50+
" \
51+
&& addgroup -S nginx \
5452
&& adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx \
5553
&& apk add --no-cache --virtual .build-deps \
5654
gcc \

stable/alpine/Dockerfile

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,51 @@ MAINTAINER NGINX Docker Maintainers "[email protected]"
44

55
ENV NGINX_VERSION 1.10.1
66

7-
ENV GPG_KEYS B0F4253373F8F6F510D42178520A9993A1C052F8
8-
ENV CONFIG "\
9-
--prefix=/etc/nginx \
10-
--sbin-path=/usr/sbin/nginx \
11-
--modules-path=/usr/lib/nginx/modules \
12-
--conf-path=/etc/nginx/nginx.conf \
13-
--error-log-path=/var/log/nginx/error.log \
14-
--http-log-path=/var/log/nginx/access.log \
15-
--pid-path=/var/run/nginx.pid \
16-
--lock-path=/var/run/nginx.lock \
17-
--http-client-body-temp-path=/var/cache/nginx/client_temp \
18-
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
19-
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
20-
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
21-
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
22-
--user=nginx \
23-
--group=nginx \
24-
--with-http_ssl_module \
25-
--with-http_realip_module \
26-
--with-http_addition_module \
27-
--with-http_sub_module \
28-
--with-http_dav_module \
29-
--with-http_flv_module \
30-
--with-http_mp4_module \
31-
--with-http_gunzip_module \
32-
--with-http_gzip_static_module \
33-
--with-http_random_index_module \
34-
--with-http_secure_link_module \
35-
--with-http_stub_status_module \
36-
--with-http_auth_request_module \
37-
--with-http_xslt_module=dynamic \
38-
--with-http_image_filter_module=dynamic \
39-
--with-http_geoip_module=dynamic \
40-
--with-http_perl_module=dynamic \
41-
--with-threads \
42-
--with-stream \
43-
--with-stream_ssl_module \
44-
--with-http_slice_module \
45-
--with-mail \
46-
--with-mail_ssl_module \
47-
--with-file-aio \
48-
--with-http_v2_module \
49-
--with-ipv6 \
50-
"
51-
52-
RUN \
53-
addgroup -S nginx \
7+
RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
8+
&& CONFIG="\
9+
--prefix=/etc/nginx \
10+
--sbin-path=/usr/sbin/nginx \
11+
--modules-path=/usr/lib/nginx/modules \
12+
--conf-path=/etc/nginx/nginx.conf \
13+
--error-log-path=/var/log/nginx/error.log \
14+
--http-log-path=/var/log/nginx/access.log \
15+
--pid-path=/var/run/nginx.pid \
16+
--lock-path=/var/run/nginx.lock \
17+
--http-client-body-temp-path=/var/cache/nginx/client_temp \
18+
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
19+
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
20+
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
21+
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
22+
--user=nginx \
23+
--group=nginx \
24+
--with-http_ssl_module \
25+
--with-http_realip_module \
26+
--with-http_addition_module \
27+
--with-http_sub_module \
28+
--with-http_dav_module \
29+
--with-http_flv_module \
30+
--with-http_mp4_module \
31+
--with-http_gunzip_module \
32+
--with-http_gzip_static_module \
33+
--with-http_random_index_module \
34+
--with-http_secure_link_module \
35+
--with-http_stub_status_module \
36+
--with-http_auth_request_module \
37+
--with-http_xslt_module=dynamic \
38+
--with-http_image_filter_module=dynamic \
39+
--with-http_geoip_module=dynamic \
40+
--with-http_perl_module=dynamic \
41+
--with-threads \
42+
--with-stream \
43+
--with-stream_ssl_module \
44+
--with-http_slice_module \
45+
--with-mail \
46+
--with-mail_ssl_module \
47+
--with-file-aio \
48+
--with-http_v2_module \
49+
--with-ipv6 \
50+
" \
51+
&& addgroup -S nginx \
5452
&& adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx \
5553
&& apk add --no-cache --virtual .build-deps \
5654
gcc \

0 commit comments

Comments
 (0)