FROM debian:jessie MAINTAINER Michał "rysiek" Woźniak # based on https://github.com/leoditommaso/docker_php-fpm/blob/master/Dockerfile # by Leandro Di Tommaso # Packages to install on the container. RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get upgrade && apt-get install -y \ php5-cgi php5-cli php5-fpm php5-curl php5-gd php5-imagick php5-imap \ php5-json php5-ldap php5-mcrypt php5-pgsql php5-odbc php5-sasl \ php5-xcache php5-xmlrpc php5-xsl # Define environment variables. # Change the following to rename your app or change the user and group the app will run # with. I don't recommend modifying the user and group but there's no problem in changing # the app name. ENV APP_NAME www ENV APP_USER www-data ENV APP_GROUP www-data # default pool config file ADD pool.conf /etc/php5/fpm/pool.d/pool.conf # startup wrapper ADD start.sh /var/lib/php5/start # make sure the PHP dir exists RUN mkdir /opt/php && chown $APP_USER:$APP_GROUP /opt/php # info RUN echo " \n\ \n\ ******************************************************** \n\ RUNNING THE CONTAINER: \n\ docker run -d -v :/var/run/php-fpm -v :/var/log/php-fpm -v :/opt/php --name \n\ \n\ ENVIRONMENT VARIABLES: \n\ APP_NAME - name of the app; default: www \n\ APP_USER - username for the php-fpm processes; default: www-data \n\ APP_USER - group name for the php-fpm processes; default: www-data \n\ ******************************************************** \n\n\ " # volumes VOLUME ["/var/run/php-fpm", "/var/log/php-fpm"] CMD ["/var/lib/php5/start"] ENTRYPOINT ["/bin/bash"]