[cherry-pick]Update portal-base and nginx-base Dockerfile.base (#17442) (#17973)

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 <jiaoya@vmware.com>

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
Yang Jiao 2022-12-13 11:27:55 +08:00 committed by GitHub
parent 1b8bc14b7f
commit 19940b6b66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -8,6 +8,9 @@
* Add date here... Add signature here...
- Add your reason here...
* Dec 1 2022 <jiaoya@vmware.com>
- Refresh base image
* Aug 1 2022 <jiaoya@vmware.com>
- Refresh base image

View File

@ -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

View File

@ -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
&& groupmod -g 10000 nginx && usermod -g 10000 -u 10000 -d /home/nginx -s /bin/bash nginx \
&& chown -R nginx:nginx /etc/nginx