From 1ea2ce61348e0a7a0433d7c3c3e2b3f2a9c07170 Mon Sep 17 00:00:00 2001 From: Yang Jiao <72076317+YangJiao0817@users.noreply.github.com> Date: Wed, 24 Aug 2022 14:48:09 +0800 Subject: [PATCH] Update portal-base and nginx-base Dockerfile.base (#17442) Installing nginx 1.22 creates the nginx group and nginx user, so instead of creating them again, modify them. Signed-off-by: Yang Jiao --- make/photon/nginx/Dockerfile.base | 2 +- make/photon/portal/Dockerfile.base | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/make/photon/nginx/Dockerfile.base b/make/photon/nginx/Dockerfile.base index 6c8949537..0c6ddeb1a 100644 --- a/make/photon/nginx/Dockerfile.base +++ b/make/photon/nginx/Dockerfile.base @@ -2,6 +2,6 @@ FROM photon:4.0 RUN tdnf install -y nginx shadow >> /dev/null \ && tdnf clean all \ - && groupadd -r -g 10000 nginx && useradd --no-log-init -r -g 10000 -u 10000 nginx \ + && groupmod -g 10000 nginx && usermod -g 10000 -u 10000 -d /home/nginx -s /bin/bash nginx \ && ln -sf /dev/stdout /var/log/nginx/access.log \ && ln -sf /dev/stderr /var/log/nginx/error.log diff --git a/make/photon/portal/Dockerfile.base b/make/photon/portal/Dockerfile.base index 33eaf9a57..cf9d5af89 100644 --- a/make/photon/portal/Dockerfile.base +++ b/make/photon/portal/Dockerfile.base @@ -4,5 +4,5 @@ RUN tdnf install -y nginx shadow >> /dev/null \ && tdnf clean all \ && ln -sf /dev/stdout /var/log/nginx/access.log \ && ln -sf /dev/stderr /var/log/nginx/error.log \ - && groupadd -r -g 10000 nginx && useradd --no-log-init -r -g 10000 -u 10000 nginx \ - && chown -R nginx:nginx /etc/nginx \ No newline at end of file + && groupmod -g 10000 nginx && usermod -g 10000 -u 10000 -d /home/nginx -s /bin/bash nginx \ + && chown -R nginx:nginx /etc/nginx