diff --git a/Dockerfile b/Dockerfile index 1df5f1f..b7370ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,8 @@ LABEL maintainer "Fabian Stamm " RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.9/community >> /etc/apk/repositories RUN apk add --no-cache php7 php7-fpm php7-opcache php7-curl php7-json php7-zip +RUN sed 's/listen = 127.0.0.1:9000/listen = \/run\/php-fpm.sock/g' + COPY --from=builder /usr/bin/caddy /usr/bin/caddy @@ -37,4 +39,7 @@ WORKDIR /srv COPY Caddyfile /etc/Caddyfile -CMD ["caddy", "run", "--config", "/etc/Caddyfile", "--adapter", "caddyfile"] +COPY start.sh /start.sh +RUN chmod +x /start.sh + +CMD ["/bin/sh", "/start.sh"] diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..5cf90b7 --- /dev/null +++ b/start.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +/usr/sbin/php-fpm7 --allow-to-run-as-root -D --fpm-config /etc/php7/php-fpm.conf + +caddy run --config /etc/Caddyfile --adapter caddyfile