2016-02-24 18:08:50 +08:00
|
|
|
FROM php:7.0-fpm
|
2016-02-16 01:20:56 +08:00
|
|
|
|
2016-02-24 18:08:50 +08:00
|
|
|
# Install Nginx
|
|
|
|
ENV NGINX_VERSION 1.9.11-1~jessie
|
|
|
|
|
|
|
|
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \
|
|
|
|
&& echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list \
|
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get install -y ca-certificates nginx=${NGINX_VERSION} gettext-base \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# Install supervisor
|
|
|
|
RUN apt-get update && apt-get install -y supervisor
|
|
|
|
|
|
|
|
# Configure nginx
|
|
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
|
|
COPY config/nginx.conf /etc/nginx/conf.d/nginx.conf
|
|
|
|
|
|
|
|
# Configure supervisor
|
|
|
|
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
|
|
|
|
# Configure PHP-FPM
|
|
|
|
COPY config/php.ini /usr/local/etc/php/conf.d/custom.ini
|
|
|
|
|
|
|
|
# Add application
|
|
|
|
RUN mkdir -p /var/www/html
|
|
|
|
WORKDIR /var/www/html
|
2016-02-16 17:13:29 +08:00
|
|
|
COPY src/ /var/www/html/
|
|
|
|
|
2016-02-24 18:08:50 +08:00
|
|
|
EXPOSE 80 443
|
|
|
|
CMD ["/usr/bin/supervisord"]
|