-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (35 loc) · 1.17 KB
/
Copy pathDockerfile
File metadata and controls
47 lines (35 loc) · 1.17 KB
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
FROM php:7.0-fpm
MAINTAINER "Zak Henry" <zak.henry@gmail.com>
RUN mkdir -p /data
WORKDIR /data
RUN apt-get update && \
apt-get install -y \
build-essential \
libpq-dev \
libmcrypt-dev \
libxml2-dev \
python-pip \
nginx
RUN pip install --upgrade supervisor supervisor-stdout
RUN docker-php-ext-install mcrypt pdo_pgsql mbstring pdo_mysql sockets opcache soap
RUN pecl install xdebug-beta && \
docker-php-ext-enable xdebug
# Configure php
ADD config/memory.ini /opt/etc/memory.ini
ADD config/xdebug.ini /opt/etc/xdebug.ini
RUN cat /opt/etc/memory.ini >> /usr/local/etc/php/conf.d/memory.ini
# Configure nginx
ADD config/nginx.conf /etc/nginx/nginx.conf
# Add supervisor config file
ADD config/supervisord.conf /etc/supervisor/supervisord.conf
# Startup scripts
# supervisord startup script
ADD config/supervisord-start.sh /opt/bin/supervisord-start.sh
RUN chmod u=rwx /opt/bin/supervisord-start.sh
# Nginx startup script
ADD config/nginx-start.sh /opt/bin/nginx-start.sh
RUN chmod u=rwx /opt/bin/nginx-start.sh
# PHP startup script
ADD config/php-start.sh /opt/bin/php-start.sh
RUN chmod u=rwx /opt/bin/php-start.sh
ENTRYPOINT ["/opt/bin/supervisord-start.sh"]