Create nginx user and group beforehand
This commit is contained in:
parent
7ed4628597
commit
b5eabcb311
@ -1,4 +1,4 @@
|
|||||||
#!/bin/execlineb -P
|
#!/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 }
|
foreground { s6-svwait -d -t 3000 nginx }
|
||||||
|
@ -43,7 +43,7 @@ RUN EOF
|
|||||||
bin/rails assets:precompile
|
bin/rails assets:precompile
|
||||||
|
|
||||||
# Change ownership
|
# Change ownership
|
||||||
chown -R www-data:www-data /srv/decidim-app
|
chown -R nginx:www-data /srv/decidim-app
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
apk --no-cache del .deps
|
apk --no-cache del .deps
|
||||||
|
@ -3,6 +3,11 @@ IMAGE alpine3.8-nginx_1.14.2-191115
|
|||||||
LAYER alpine3.8_3.8.4-190620
|
LAYER alpine3.8_3.8.4-190620
|
||||||
|
|
||||||
RUN EOF
|
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
|
apk --no-cache add nginx
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ LAYER alpine3.8_3.8.4-190620
|
|||||||
LAYER alpine3.8-nginx_1.14.2-191115
|
LAYER alpine3.8-nginx_1.14.2-191115
|
||||||
|
|
||||||
RUN EOF
|
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
|
ln -s /usr/bin/php5 /usr/bin/php
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -3,6 +3,11 @@ IMAGE alpine3.9-nginx_1.14.2-191115
|
|||||||
LAYER alpine3.9_3.9.4-190620
|
LAYER alpine3.9_3.9.4-190620
|
||||||
|
|
||||||
RUN EOF
|
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
|
apk --no-cache add nginx
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user