FROM debian:stable-slim RUN apt-get update && \ apt-get -qy install \ php-fpm php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip php-redis \ wget sed curl tar ca-certificates less \ mariadb-client && \ apt-get clean COPY config/php-fpm-wordpress.conf /tmp/www.conf RUN PHP_VERSION=$(php --version | head -n 1 | cut -f2 -d" " | cut -f1,2 -d".") && \ cp /tmp/www.conf /etc/php/$PHP_VERSION/fpm/pool.d/www.conf && \ mkdir /run/php/ && \ ln -s /usr/sbin/php-fpm$PHP_VERSION /usr/sbin/php-fpm && \ sed -i '/^error_log/cerror_log = /app/log/php-fpm.log' /etc/php/$PHP_VERSION/fpm/php-fpm.conf && \ sed -i '/^pid/cpid = /app/log/php-fpm.pid' /etc/php/$PHP_VERSION/fpm/php-fpm.conf WORKDIR /app RUN curl -s -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \ chmod +x wp-cli.phar && \ mv wp-cli.phar /usr/local/bin/wp ADD wordpress /tmp/wordpress ADD entrypoint.sh /entrypoint.sh EXPOSE 9000 VOLUME /app ENTRYPOINT ["/bin/sh","/entrypoint.sh"] CMD ["/usr/sbin/php-fpm","--nodaemonize","-O"]