Skip to content

Commit b749353

Browse files
committed
Made the UID/GID consistent throughout the variants.
101 was chosen as UID/GID for both supported platforms since that's the first unused pair. This also looks forward compatible at least for now with Debian Buster and Alpine 3.10 as from the :edge tag of the time writing this message. Fixes: nginx#218.
1 parent c308ce3 commit b749353

File tree

8 files changed

+24
-0
lines changed

8 files changed

+24
-0
lines changed

mainline/alpine-perl/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ENV NJS_VERSION 0.3.2
77
ENV PKG_RELEASE 1
88

99
RUN set -x \
10+
# create nginx user/group first, to be consistent throughout docker variants
11+
&& addgroup -g 101 -S nginx \
12+
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \
1013
&& apkArch="$(cat /etc/apk/arch)" \
1114
&& nginxPackages=" \
1215
nginx=${NGINX_VERSION}-r${PKG_RELEASE} \

mainline/alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ENV NJS_VERSION 0.3.2
77
ENV PKG_RELEASE 1
88

99
RUN set -x \
10+
# create nginx user/group first, to be consistent throughout docker variants
11+
&& addgroup -g 101 -S nginx \
12+
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \
1013
&& apkArch="$(cat /etc/apk/arch)" \
1114
&& nginxPackages=" \
1215
nginx=${NGINX_VERSION}-r${PKG_RELEASE} \

mainline/stretch-perl/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ENV NJS_VERSION 0.3.2
77
ENV PKG_RELEASE 1~stretch
88

99
RUN set -x \
10+
# create nginx user/group first, to be consistent throughout docker variants
11+
&& addgroup --system --gid 101 nginx \
12+
&& adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 101 nginx \
1013
&& apt-get update \
1114
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
1215
&& \

mainline/stretch/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ENV NJS_VERSION 0.3.2
77
ENV PKG_RELEASE 1~stretch
88

99
RUN set -x \
10+
# create nginx user/group first, to be consistent throughout docker variants
11+
&& addgroup --system --gid 101 nginx \
12+
&& adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 101 nginx \
1013
&& apt-get update \
1114
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
1215
&& \

stable/alpine-perl/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ENV NJS_VERSION 0.3.2
77
ENV PKG_RELEASE 1
88

99
RUN set -x \
10+
# create nginx user/group first, to be consistent throughout docker variants
11+
&& addgroup -g 101 -S nginx \
12+
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \
1013
&& apkArch="$(cat /etc/apk/arch)" \
1114
&& nginxPackages=" \
1215
nginx=${NGINX_VERSION}-r${PKG_RELEASE} \

stable/alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ENV NJS_VERSION 0.3.2
77
ENV PKG_RELEASE 1
88

99
RUN set -x \
10+
# create nginx user/group first, to be consistent throughout docker variants
11+
&& addgroup -g 101 -S nginx \
12+
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \
1013
&& apkArch="$(cat /etc/apk/arch)" \
1114
&& nginxPackages=" \
1215
nginx=${NGINX_VERSION}-r${PKG_RELEASE} \

stable/stretch-perl/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ENV NJS_VERSION 0.3.2
77
ENV PKG_RELEASE 1~stretch
88

99
RUN set -x \
10+
# create nginx user/group first, to be consistent throughout docker variants
11+
&& addgroup --system --gid 101 nginx \
12+
&& adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 101 nginx \
1013
&& apt-get update \
1114
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
1215
&& \

stable/stretch/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ENV NJS_VERSION 0.3.2
77
ENV PKG_RELEASE 1~stretch
88

99
RUN set -x \
10+
# create nginx user/group first, to be consistent throughout docker variants
11+
&& addgroup --system --gid 101 nginx \
12+
&& adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 101 nginx \
1013
&& apt-get update \
1114
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
1215
&& \

0 commit comments

Comments
 (0)