Skip to content

Commit c10dfd0

Browse files
alessfgthresheek
authored andcommitted
Change tabs to spaces
And other minor formatting fixes Signed-off-by: Konstantin Pavlov <[email protected]>
1 parent 0e47be3 commit c10dfd0

File tree

8 files changed

+280
-280
lines changed

8 files changed

+280
-280
lines changed

mainline/alpine-perl/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL maintainer="NGINX Docker Maintainers <[email protected]>"
44

55
ENV NGINX_VERSION 1.17.0
66
ENV NJS_VERSION 0.3.2
7-
ENV PKG_RELEASE 1
7+
ENV PKG_RELEASE 1
88

99
RUN set -x \
1010
# create nginx user/group first, to be consistent throughout docker variants
@@ -28,12 +28,12 @@ RUN set -x \
2828
openssl curl ca-certificates \
2929
&& curl -o /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub \
3030
&& if [ "$(openssl rsa -pubin -in /tmp/nginx_signing.rsa.pub -text -noout | openssl sha512 -r)" = "$KEY_SHA512" ]; then \
31-
echo "key verification succeeded!"; \
32-
mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; \
33-
else \
34-
echo "key verification failed!"; \
35-
exit 1; \
36-
fi \
31+
echo "key verification succeeded!"; \
32+
mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; \
33+
else \
34+
echo "key verification failed!"; \
35+
exit 1; \
36+
fi \
3737
&& printf "%s%s%s\n" \
3838
"http://nginx.org/packages/mainline/alpine/v" \
3939
`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` \

mainline/alpine/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL maintainer="NGINX Docker Maintainers <[email protected]>"
44

55
ENV NGINX_VERSION 1.17.0
66
ENV NJS_VERSION 0.3.2
7-
ENV PKG_RELEASE 1
7+
ENV PKG_RELEASE 1
88

99
RUN set -x \
1010
# create nginx user/group first, to be consistent throughout docker variants
@@ -27,12 +27,12 @@ RUN set -x \
2727
openssl curl ca-certificates \
2828
&& curl -o /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub \
2929
&& if [ "$(openssl rsa -pubin -in /tmp/nginx_signing.rsa.pub -text -noout | openssl sha512 -r)" = "$KEY_SHA512" ]; then \
30-
echo "key verification succeeded!"; \
31-
mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; \
32-
else \
33-
echo "key verification failed!"; \
34-
exit 1; \
35-
fi \
30+
echo "key verification succeeded!"; \
31+
mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; \
32+
else \
33+
echo "key verification failed!"; \
34+
exit 1; \
35+
fi \
3636
&& printf "%s%s%s\n" \
3737
"http://nginx.org/packages/mainline/alpine/v" \
3838
`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` \

mainline/stretch-perl/Dockerfile

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -10,92 +10,92 @@ RUN set -x \
1010
# create nginx user/group first, to be consistent throughout docker variants
1111
&& addgroup --system --gid 101 nginx \
1212
&& adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 101 nginx \
13-
&& apt-get update \
14-
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
15-
&& \
16-
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
17-
found=''; \
18-
for server in \
19-
ha.pool.sks-keyservers.net \
20-
hkp://keyserver.ubuntu.com:80 \
21-
hkp://p80.pool.sks-keyservers.net:80 \
22-
pgp.mit.edu \
23-
; do \
24-
echo "Fetching GPG key $NGINX_GPGKEY from $server"; \
25-
apt-key adv --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \
26-
done; \
27-
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
28-
apt-get remove --purge --auto-remove -y gnupg1 && rm -rf /var/lib/apt/lists/* \
29-
&& dpkgArch="$(dpkg --print-architecture)" \
13+
&& apt-get update \
14+
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
15+
&& \
16+
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
17+
found=''; \
18+
for server in \
19+
ha.pool.sks-keyservers.net \
20+
hkp://keyserver.ubuntu.com:80 \
21+
hkp://p80.pool.sks-keyservers.net:80 \
22+
pgp.mit.edu \
23+
; do \
24+
echo "Fetching GPG key $NGINX_GPGKEY from $server"; \
25+
apt-key adv --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \
26+
done; \
27+
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
28+
apt-get remove --purge --auto-remove -y gnupg1 && rm -rf /var/lib/apt/lists/* \
29+
&& dpkgArch="$(dpkg --print-architecture)" \
3030
&& nginxPackages=" \
3131
nginx=${NGINX_VERSION}-${PKG_RELEASE} \
3232
nginx-module-xslt=${NGINX_VERSION}-${PKG_RELEASE} \
3333
nginx-module-geoip=${NGINX_VERSION}-${PKG_RELEASE} \
3434
nginx-module-image-filter=${NGINX_VERSION}-${PKG_RELEASE} \
3535
nginx-module-perl=${NGINX_VERSION}-${PKG_RELEASE} \
3636
nginx-module-njs=${NGINX_VERSION}.${NJS_VERSION}-${PKG_RELEASE} \
37-
" \
38-
&& case "$dpkgArch" in \
39-
amd64|i386) \
37+
" \
38+
&& case "$dpkgArch" in \
39+
amd64|i386) \
4040
# arches officialy built by upstream
41-
echo "deb https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
42-
&& apt-get update \
43-
;; \
44-
*) \
41+
echo "deb https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
42+
&& apt-get update \
43+
;; \
44+
*) \
4545
# we're on an architecture upstream doesn't officially build for
4646
# let's build binaries from the published source packages
47-
echo "deb-src https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
48-
\
47+
echo "deb-src https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
48+
\
4949
# new directory for storing sources and .deb files
50-
&& tempDir="$(mktemp -d)" \
51-
&& chmod 777 "$tempDir" \
50+
&& tempDir="$(mktemp -d)" \
51+
&& chmod 777 "$tempDir" \
5252
# (777 to ensure APT's "_apt" user can access it too)
53-
\
53+
\
5454
# save list of currently-installed packages so build dependencies can be cleanly removed later
55-
&& savedAptMark="$(apt-mark showmanual)" \
56-
\
55+
&& savedAptMark="$(apt-mark showmanual)" \
56+
\
5757
# build .deb files from upstream's source packages (which are verified by apt-get)
58-
&& apt-get update \
59-
&& apt-get build-dep -y $nginxPackages \
60-
&& ( \
61-
cd "$tempDir" \
62-
&& DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \
63-
apt-get source --compile $nginxPackages \
64-
) \
58+
&& apt-get update \
59+
&& apt-get build-dep -y $nginxPackages \
60+
&& ( \
61+
cd "$tempDir" \
62+
&& DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \
63+
apt-get source --compile $nginxPackages \
64+
) \
6565
# we don't remove APT lists here because they get re-downloaded and removed later
66-
\
66+
\
6767
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
6868
# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies)
69-
&& apt-mark showmanual | xargs apt-mark auto > /dev/null \
70-
&& { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
71-
\
69+
&& apt-mark showmanual | xargs apt-mark auto > /dev/null \
70+
&& { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
71+
\
7272
# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be)
73-
&& ls -lAFh "$tempDir" \
74-
&& ( cd "$tempDir" && dpkg-scanpackages . > Packages ) \
75-
&& grep '^Package: ' "$tempDir/Packages" \
76-
&& echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list \
73+
&& ls -lAFh "$tempDir" \
74+
&& ( cd "$tempDir" && dpkg-scanpackages . > Packages ) \
75+
&& grep '^Package: ' "$tempDir/Packages" \
76+
&& echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list \
7777
# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes")
7878
# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied)
7979
# ...
8080
# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied)
81-
&& apt-get -o Acquire::GzipIndexes=false update \
82-
;; \
83-
esac \
84-
\
85-
&& apt-get install --no-install-recommends --no-install-suggests -y \
86-
$nginxPackages \
87-
gettext-base \
88-
&& apt-get remove --purge --auto-remove -y apt-transport-https ca-certificates && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx.list \
89-
\
81+
&& apt-get -o Acquire::GzipIndexes=false update \
82+
;; \
83+
esac \
84+
\
85+
&& apt-get install --no-install-recommends --no-install-suggests -y \
86+
$nginxPackages \
87+
gettext-base \
88+
&& apt-get remove --purge --auto-remove -y apt-transport-https ca-certificates && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx.list \
89+
\
9090
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
91-
&& if [ -n "$tempDir" ]; then \
92-
apt-get purge -y --auto-remove \
93-
&& rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
94-
fi
91+
&& if [ -n "$tempDir" ]; then \
92+
apt-get purge -y --auto-remove \
93+
&& rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
94+
fi
9595

9696
# forward request and error logs to docker log collector
9797
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
98-
&& ln -sf /dev/stderr /var/log/nginx/error.log
98+
&& ln -sf /dev/stderr /var/log/nginx/error.log
9999

100100
EXPOSE 80
101101

mainline/stretch/Dockerfile

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -10,91 +10,91 @@ RUN set -x \
1010
# create nginx user/group first, to be consistent throughout docker variants
1111
&& addgroup --system --gid 101 nginx \
1212
&& adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 101 nginx \
13-
&& apt-get update \
14-
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
15-
&& \
16-
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
17-
found=''; \
18-
for server in \
19-
ha.pool.sks-keyservers.net \
20-
hkp://keyserver.ubuntu.com:80 \
21-
hkp://p80.pool.sks-keyservers.net:80 \
22-
pgp.mit.edu \
23-
; do \
24-
echo "Fetching GPG key $NGINX_GPGKEY from $server"; \
25-
apt-key adv --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \
26-
done; \
27-
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
28-
apt-get remove --purge --auto-remove -y gnupg1 && rm -rf /var/lib/apt/lists/* \
29-
&& dpkgArch="$(dpkg --print-architecture)" \
30-
&& nginxPackages=" \
31-
nginx=${NGINX_VERSION}-${PKG_RELEASE} \
32-
nginx-module-xslt=${NGINX_VERSION}-${PKG_RELEASE} \
33-
nginx-module-geoip=${NGINX_VERSION}-${PKG_RELEASE} \
34-
nginx-module-image-filter=${NGINX_VERSION}-${PKG_RELEASE} \
35-
nginx-module-njs=${NGINX_VERSION}.${NJS_VERSION}-${PKG_RELEASE} \
36-
" \
37-
&& case "$dpkgArch" in \
38-
amd64|i386) \
13+
&& apt-get update \
14+
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
15+
&& \
16+
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
17+
found=''; \
18+
for server in \
19+
ha.pool.sks-keyservers.net \
20+
hkp://keyserver.ubuntu.com:80 \
21+
hkp://p80.pool.sks-keyservers.net:80 \
22+
pgp.mit.edu \
23+
; do \
24+
echo "Fetching GPG key $NGINX_GPGKEY from $server"; \
25+
apt-key adv --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \
26+
done; \
27+
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
28+
apt-get remove --purge --auto-remove -y gnupg1 && rm -rf /var/lib/apt/lists/* \
29+
&& dpkgArch="$(dpkg --print-architecture)" \
30+
&& nginxPackages=" \
31+
nginx=${NGINX_VERSION}-${PKG_RELEASE} \
32+
nginx-module-xslt=${NGINX_VERSION}-${PKG_RELEASE} \
33+
nginx-module-geoip=${NGINX_VERSION}-${PKG_RELEASE} \
34+
nginx-module-image-filter=${NGINX_VERSION}-${PKG_RELEASE} \
35+
nginx-module-njs=${NGINX_VERSION}.${NJS_VERSION}-${PKG_RELEASE} \
36+
" \
37+
&& case "$dpkgArch" in \
38+
amd64|i386) \
3939
# arches officialy built by upstream
40-
echo "deb https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
41-
&& apt-get update \
42-
;; \
43-
*) \
40+
echo "deb https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
41+
&& apt-get update \
42+
;; \
43+
*) \
4444
# we're on an architecture upstream doesn't officially build for
4545
# let's build binaries from the published source packages
46-
echo "deb-src https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
47-
\
46+
echo "deb-src https://nginx.org/packages/mainline/debian/ stretch nginx" >> /etc/apt/sources.list.d/nginx.list \
47+
\
4848
# new directory for storing sources and .deb files
49-
&& tempDir="$(mktemp -d)" \
50-
&& chmod 777 "$tempDir" \
49+
&& tempDir="$(mktemp -d)" \
50+
&& chmod 777 "$tempDir" \
5151
# (777 to ensure APT's "_apt" user can access it too)
52-
\
52+
\
5353
# save list of currently-installed packages so build dependencies can be cleanly removed later
54-
&& savedAptMark="$(apt-mark showmanual)" \
55-
\
54+
&& savedAptMark="$(apt-mark showmanual)" \
55+
\
5656
# build .deb files from upstream's source packages (which are verified by apt-get)
57-
&& apt-get update \
58-
&& apt-get build-dep -y $nginxPackages \
59-
&& ( \
60-
cd "$tempDir" \
61-
&& DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \
62-
apt-get source --compile $nginxPackages \
63-
) \
57+
&& apt-get update \
58+
&& apt-get build-dep -y $nginxPackages \
59+
&& ( \
60+
cd "$tempDir" \
61+
&& DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \
62+
apt-get source --compile $nginxPackages \
63+
) \
6464
# we don't remove APT lists here because they get re-downloaded and removed later
65-
\
65+
\
6666
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
6767
# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies)
68-
&& apt-mark showmanual | xargs apt-mark auto > /dev/null \
69-
&& { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
70-
\
68+
&& apt-mark showmanual | xargs apt-mark auto > /dev/null \
69+
&& { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; } \
70+
\
7171
# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be)
72-
&& ls -lAFh "$tempDir" \
73-
&& ( cd "$tempDir" && dpkg-scanpackages . > Packages ) \
74-
&& grep '^Package: ' "$tempDir/Packages" \
75-
&& echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list \
72+
&& ls -lAFh "$tempDir" \
73+
&& ( cd "$tempDir" && dpkg-scanpackages . > Packages ) \
74+
&& grep '^Package: ' "$tempDir/Packages" \
75+
&& echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list \
7676
# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes")
7777
# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied)
7878
# ...
7979
# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied)
80-
&& apt-get -o Acquire::GzipIndexes=false update \
81-
;; \
82-
esac \
83-
\
84-
&& apt-get install --no-install-recommends --no-install-suggests -y \
85-
$nginxPackages \
86-
gettext-base \
87-
&& apt-get remove --purge --auto-remove -y apt-transport-https ca-certificates && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx.list \
88-
\
80+
&& apt-get -o Acquire::GzipIndexes=false update \
81+
;; \
82+
esac \
83+
\
84+
&& apt-get install --no-install-recommends --no-install-suggests -y \
85+
$nginxPackages \
86+
gettext-base \
87+
&& apt-get remove --purge --auto-remove -y apt-transport-https ca-certificates && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx.list \
88+
\
8989
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
90-
&& if [ -n "$tempDir" ]; then \
91-
apt-get purge -y --auto-remove \
92-
&& rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
93-
fi
90+
&& if [ -n "$tempDir" ]; then \
91+
apt-get purge -y --auto-remove \
92+
&& rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
93+
fi
9494

9595
# forward request and error logs to docker log collector
9696
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
97-
&& ln -sf /dev/stderr /var/log/nginx/error.log
97+
&& ln -sf /dev/stderr /var/log/nginx/error.log
9898

9999
EXPOSE 80
100100

stable/alpine-perl/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL maintainer="NGINX Docker Maintainers <[email protected]>"
44

55
ENV NGINX_VERSION 1.16.0
66
ENV NJS_VERSION 0.3.2
7-
ENV PKG_RELEASE 1
7+
ENV PKG_RELEASE 1
88

99
RUN set -x \
1010
# create nginx user/group first, to be consistent throughout docker variants
@@ -28,12 +28,12 @@ RUN set -x \
2828
openssl curl ca-certificates \
2929
&& curl -o /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub \
3030
&& if [ "$(openssl rsa -pubin -in /tmp/nginx_signing.rsa.pub -text -noout | openssl sha512 -r)" = "$KEY_SHA512" ]; then \
31-
echo "key verification succeeded!"; \
32-
mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; \
33-
else \
34-
echo "key verification failed!"; \
35-
exit 1; \
36-
fi \
31+
echo "key verification succeeded!"; \
32+
mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; \
33+
else \
34+
echo "key verification failed!"; \
35+
exit 1; \
36+
fi \
3737
&& printf "%s%s%s\n" \
3838
"http://nginx.org/packages/alpine/v" \
3939
`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` \

0 commit comments

Comments
 (0)