Create nginx user and group beforehand

This commit is contained in:
Disassembler 2019-11-17 21:28:21 +01:00
parent 7ed4628597
commit b5eabcb311
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
5 changed files with 13 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#!/bin/execlineb -P
foreground { s6-svwait -d -t 3000 cts }
foreground { s6-svwait -d -t 3000 delayed_job }
foreground { s6-svwait -d -t 3000 nginx }

View File

@ -43,7 +43,7 @@ RUN EOF
bin/rails assets:precompile
# Change ownership
chown -R www-data:www-data /srv/decidim-app
chown -R nginx:www-data /srv/decidim-app
# Cleanup
apk --no-cache del .deps

View File

@ -3,6 +3,11 @@ IMAGE alpine3.8-nginx_1.14.2-191115
LAYER alpine3.8_3.8.4-190620
RUN EOF
# Add nginx user (which will be picked up later by apk add)
addgroup -Sg 1080 nginx 2>/dev/null
adduser -Su 1080 -D -H -h /var/lib/nginx -s /sbin/nologin -G nginx -g nginx nginx 2>/dev/null
# Install nginx
apk --no-cache add nginx
EOF

View File

@ -4,7 +4,7 @@ LAYER alpine3.8_3.8.4-190620
LAYER alpine3.8-nginx_1.14.2-191115
RUN EOF
apk --no-cache add nginx php5 php5-ctype php5-fpm php5-gd php5-json php5-mcrypt php5-opcache
apk --no-cache add php5 php5-ctype php5-fpm php5-gd php5-json php5-mcrypt php5-opcache
ln -s /usr/bin/php5 /usr/bin/php
EOF

View File

@ -3,6 +3,11 @@ IMAGE alpine3.9-nginx_1.14.2-191115
LAYER alpine3.9_3.9.4-190620
RUN EOF
# Add nginx user (which will be picked up later by apk add)
addgroup -Sg 1080 nginx 2>/dev/null
adduser -Su 1080 -D -H -h /var/lib/nginx -s /sbin/nologin -G nginx -g nginx nginx 2>/dev/null
# Install nginx
apk --no-cache add nginx
EOF