Browse Source

Configure nginx user & group id as in FPM image

Stephan Hochdörfer 3 năm trước cách đây
mục cha
commit
13ed512bf9
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      images/nginx/1.18/Dockerfile

+ 4 - 2
images/nginx/1.18/Dockerfile

@@ -1,8 +1,10 @@
 FROM nginx:1.18-alpine
 MAINTAINER Mark Shust <mark@shust.com>
 
-RUN addgroup -g 1000 app \
- && adduser -G app -u 1000 -h /var/www -s /bin/bash -S app
+ARG APP_ID=1000
+
+RUN addgroup -g "$APP_ID" app \
+ && adduser -G app -u "$APP_ID" -h /var/www -s /bin/bash -S app
 RUN touch /var/run/nginx.pid
 RUN mkdir /sock