Skip to content

Commit 2f8871f

Browse files
committed
✨ Create nginx user with uid/gid 33
1 parent 84f7e93 commit 2f8871f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
5252
--with-file-aio \
5353
--with-http_v2_module \
5454
" \
55-
&& addgroup -S nginx \
56-
&& adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx \
55+
&& deluser xfs \
56+
&& addgroup -g 33 -S nginx \
57+
&& adduser -u 33 -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx \
5758
&& apk add --no-cache --virtual .build-deps \
5859
gcc \
5960
libc-dev \

rootfs/etc/nginx/nginx.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
worker_processes auto;
22
pid /var/run/nginx.pid;
33
pcre_jit on;
4+
user nginx;
45

56
events {
67
worker_connections 2048;

0 commit comments

Comments
 (0)