mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-07-01 14:45:38 +00:00
delete all root process
This commit is contained in:
@ -8,7 +8,8 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
||||
&& apk -U add \
|
||||
$BUILD_DEPS \
|
||||
nginx \
|
||||
supervisor \
|
||||
s6 \
|
||||
su-exec \
|
||||
tini@commuedge \
|
||||
php7-fpm@commuedge \
|
||||
php7-gd@commuedge \
|
||||
@ -23,13 +24,13 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
||||
COPY supervisord.conf /usr/local/etc/supervisord.conf
|
||||
COPY run.sh /usr/local/bin/run.sh
|
||||
COPY s6.d /etc/s6.d
|
||||
|
||||
RUN chmod +x /usr/local/bin/run.sh
|
||||
RUN chmod +x /usr/local/bin/run.sh /etc/s6.d/*/*
|
||||
|
||||
VOLUME /zerobin/data
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 8888
|
||||
|
||||
CMD ["/sbin/tini","--","run.sh"]
|
||||
CMD ["run.sh"]
|
||||
|
@ -15,4 +15,4 @@ Paste securely.
|
||||
- **/zerobin/data**
|
||||
|
||||
#### Ports
|
||||
- **80** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)
|
||||
- **8888** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)
|
||||
|
@ -1,6 +1,5 @@
|
||||
user zerobin;
|
||||
worker_processes auto;
|
||||
pid /var/run/nginx.pid;
|
||||
pid /tmp/nginx.pid;
|
||||
daemon off;
|
||||
|
||||
events {
|
||||
@ -47,7 +46,7 @@ http {
|
||||
image/svg+xml;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 8888;
|
||||
root /zerobin;
|
||||
index index.php index.html;
|
||||
|
||||
@ -74,7 +73,7 @@ http {
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_index index.php;
|
||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
||||
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
@ -1,9 +1,5 @@
|
||||
[www]
|
||||
user = zerobin
|
||||
group = zerobin
|
||||
listen = /var/run/php-fpm.sock
|
||||
listen.owner = zerobin
|
||||
listen.group = zerobin
|
||||
listen = /tmp/php-fpm.sock
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 2
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
addgroup -g ${GID} zerobin && adduser -h /zerobin -s /bin/sh -D -G zerobin -u ${UID} zerobin
|
||||
touch /var/run/php-fpm.sock
|
||||
chown -R zerobin:zerobin /zerobin /var/run/php-fpm.sock /var/lib/nginx /tmp
|
||||
exec supervisord -c /usr/local/etc/supervisord.conf
|
||||
chown -R $UID:$GID /zerobin /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d
|
||||
exec su-exec $UID:$GID /sbin/tini -- /bin/s6-svscan /etc/s6.d
|
||||
|
2
privatebin/s6.d/nginx/run
Normal file
2
privatebin/s6.d/nginx/run
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec nginx
|
2
privatebin/s6.d/php/run
Normal file
2
privatebin/s6.d/php/run
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec php-fpm7
|
@ -1,8 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:php-fpm]
|
||||
command=php-fpm7 --nodaemonize
|
||||
|
||||
[program:nginx]
|
||||
command=nginx
|
Reference in New Issue
Block a user