1
0
Fork 0

Switch to s6 instead of supervisor

Further reduces the images size from 100.2MB to 59.97MB
pull/31/head
Ruben Vermeersch 8 years ago
parent 1de5eb7a1d
commit 717fbe4264

@ -1,7 +1,7 @@
FROM alpine:3.4
MAINTAINER Christian Lück <christian@lueck.tv>
RUN apk add --update nginx supervisor php5-fpm php5-cli php5-curl php5-gd php5-json php5-dom php5-pcntl php5-posix \
RUN apk add --update nginx s6 php5-fpm php5-cli php5-curl php5-gd php5-json php5-dom php5-pcntl php5-posix \
php5-pgsql php5-mysql php5-mcrypt php5-pdo php5-pdo_pgsql php5-pdo_mysql ca-certificates && \
rm -rf /var/cache/apk/*
@ -30,5 +30,5 @@ ENV DB_PASS ttrss
# always re-configure database with current ENV when RUNning container, then monitor all services
ADD configure-db.php /configure-db.php
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD php /configure-db.php && supervisord -c /etc/supervisor/conf.d/supervisord.conf
ADD s6/ /etc/s6/
CMD php /configure-db.php && s6-svscan /etc/s6/

@ -0,0 +1,3 @@
#!/bin/sh
exec /usr/sbin/nginx

@ -0,0 +1,3 @@
#!/bin/sh
exec /usr/bin/php-fpm --nodaemonize

@ -0,0 +1,3 @@
#!/bin/sh
exec s6-setuidgid nobody /usr/bin/php /var/www/update_daemon2.php

@ -1,15 +0,0 @@
[supervisord]
nodaemon=true
[program:php-fpm]
command=/usr/bin/php-fpm --nodaemonize
[program:nginx]
command=/usr/sbin/nginx
[program:ttrss-update-daemon]
command=/usr/bin/php /var/www/update_daemon2.php
user=nobody
stdout_logfile=/tmp/%(program_name)s.stdout
stderr_logfile=/tmp/%(program_name)s.stderr
Loading…
Cancel
Save