forked from danielmccoy/alpine-nginx-phpfpm-pgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (43 loc) · 1.03 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM alpine:3.6
MAINTAINER Jordan Jones <[email protected]>
RUN apk --update add \
nginx \
php7-fpm \
php7-pdo \
php7-json \
php7-openssl \
php7-pgsql \
php7-pdo_pgsql \
php7-mcrypt \
php7-sqlite3 \
php7-pdo_sqlite \
php7-ctype \
php7-zlib \
php7-xml \
php7-gd \
curl \
py-pip \
php7-curl \
php7-zip \
php7-iconv \
php7-session \
php7-tokenizer \
supervisor
# Configure supervisor
RUN pip install --upgrade pip && \
pip install supervisor-stdout
RUN mkdir -p /etc/nginx
RUN mkdir -p /run/nginx
RUN mkdir -p /var/run/php-fpm
RUN mkdir -p /var/log/supervisor
RUN rm /etc/nginx/nginx.conf
ADD nginx.conf /etc/nginx/nginx.conf
RUN rm /etc/php7/php-fpm.d/www.conf
ADD www.conf /etc/php7/php-fpm.d/www.conf
VOLUME ["/var/www", "/etc/nginx/sites-enabled"]
ADD nginx-supervisor.ini /etc/supervisor.d/nginx-supervisor.ini
ENV TIMEZONE America/Los_Angeles
RUN ln -sf /dev/stderr /var/log/nginx/error.log
RUN ln -sf /dev/stdout /var/log/nginx/access.log
EXPOSE 80 9000
CMD ["/usr/bin/supervisord"]