forked from formapro/docker-nginx-php-fpm-supervisor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (20 loc) · 956 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM ubuntu:16.04
MAINTAINER Maksim Kotliar <[email protected]>
RUN apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests nginx php php-fpm ca-certificates gettext && \
rm -rf /var/lib/apt/lists/*
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
&& ln -sf /dev/stderr /var/log/php7.0-fpm.log
RUN rm -f /etc/nginx/sites-enabled/*
COPY nginx.conf.tpl /tmp/nginx.conf.tpl
COPY php-fpm.conf.tpl /tmp/php-fpm.conf.tpl
RUN mkdir -p /run/php && touch /run/php/php7.0-fpm.sock && touch /run/php/php7.0-fpm.pid
COPY entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh
EXPOSE 80
CMD ["/entrypoint.sh"]
RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests supervisor
COPY listener.php /listener.php
COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf