-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
54 lines (44 loc) · 1.42 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
54
FROM debian:jessie
# Let the container know that there is no tty
ENV DEBIAN_FRONTEND noninteractive
# Install necessary packages
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
wget \
libcurl4-openssl-dev \
libmcrypt-dev \
libxml2-dev \
libjpeg-dev \
libjpeg62 \
libfreetype6-dev \
libmysqlclient-dev \
libgmp-dev \
libicu-dev \
libpspell-dev \
librecode-dev \
libxpm-dev \
nginx \
supervisor \
locales
# Ensure UTF-8 locale
RUN sed -i "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/" /etc/locale.gen
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN locale-gen
# Download PHP7
ADD http://repos.zend.com/zend-server/early-access/php7/php-7.0-latest-DEB-x86_64.tar.gz /usr/local/php7
RUN tar xzPf /usr/local/php7 \
&& echo 'export PATH="$PATH:/usr/local/php7/bin:/usr/local/php7/sbin"' >> /etc/bash.bashrc
# Configure PHP-FPM, Nginx and Supervisor
ADD conf/php-fpm.conf /etc/php7/php-fpm.conf
ADD conf/www.conf /etc/php7/php-fpm.d/www.conf
ADD ./conf/supervisord.conf /etc/supervisor/supervisord.conf
ADD ./conf/nginx.conf /etc/nginx/sites-available/default
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf
RUN rm -fr /tmp/* /var/lib/apt/lists/* /var/tmp/* \
&& apt-get autoremove -y \
&& apt-get autoclean \
&& apt-get clean
WORKDIR /
EXPOSE 80
CMD ["/usr/bin/supervisord"]