mirror of
https://github.com/netfun2000/docker-php-nginx.git
synced 2026-08-26 21:49:47 +08:00
Rewrote the example setup to have only one Docker container
This commit is contained in:
+28
-2
@@ -1,5 +1,31 @@
|
||||
FROM debian:jessie
|
||||
FROM php:7.0-fpm
|
||||
|
||||
# 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
|
||||
COPY src/ /var/www/html/
|
||||
|
||||
VOLUME /var/www/html/
|
||||
EXPOSE 80 443
|
||||
CMD ["/usr/bin/supervisord"]
|
||||
|
||||
Reference in New Issue
Block a user