├── LICENSE ├── README.md └── Dockerfile /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Dylan Lindgren 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Docker + Laravel](https://cloud.githubusercontent.com/assets/6241518/4891723/2afe1b12-63ab-11e4-9cac-d86e49119484.jpg) 2 | 3 | This is a [Docker](http://www.docker.com) image for [PHP-FPM](http://php-fpm.org), intended for use in the fashion described on my series of blog articles about using Docker and the [Laravel PHP framework](http://www.laravel.com) together: 4 | 5 | 1. [Docker for the Laravel framework](http://dylanlindgren.com/docker-for-the-laravel-framework) (24 Sep 2014) 6 | 2. [Beautiful Laravel Development with Docker & Fig](http://dylanlindgren.com/laravel-development-docker-fig) (9 Oct 2014) 7 | 8 | An automated build for this repo is available on the [Docker Hub](https://registry.hub.docker.com/u/dylanlindgren/docker-laravel-phpfpm). 9 | 10 | This image works well with the below related images. 11 | - [dylanlindgren/docker-laravel-data](https://github.com/dylanlindgren/docker-laravel-data) 12 | - [dylanlindgren/docker-laravel-nginx](https://github.com/dylanlindgren/docker-laravel-nginx) 13 | - [dylanlindgren/docker-laravel-composer](https://github.com/dylanlindgren/docker-laravel-composer) 14 | - [dylanlindgren/docker-laravel-artisan](https://github.com/dylanlindgren/docker-laravel-artisan) 15 | - [dylanlindgren/docker-laravel-bower](https://github.com/dylanlindgren/docker-laravel-bower) 16 | - [dylanlindgren/docker-laravel-phpunit](https://github.com/dylanlindgren/docker-laravel-phpunit) 17 | 18 | If you have any feedback or questions, feel free to leave a comment on my blog, or you can contact me on Twitter with [@dylanlindgren](https://twitter.com/dylanlindgren) or email with dylan.lindgren@gmail.com. 19 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:jessie 2 | 3 | MAINTAINER "Dylan Lindgren" 4 | 5 | # Install PHP-FPM and popular/laravel required extensions 6 | RUN apt-get update -y && \ 7 | apt-get install -y \ 8 | php5-fpm \ 9 | php5-curl \ 10 | php5-gd \ 11 | php5-geoip \ 12 | php5-imagick \ 13 | php5-imap \ 14 | php5-json \ 15 | php5-ldap \ 16 | php5-mcrypt \ 17 | php5-memcache \ 18 | php5-memcached \ 19 | php5-mongo \ 20 | php5-mssql \ 21 | php5-mysqlnd \ 22 | php5-pgsql \ 23 | php5-redis \ 24 | php5-sqlite \ 25 | php5-xdebug \ 26 | php5-xmlrpc \ 27 | php5-xcache 28 | 29 | # Configure PHP-FPM 30 | RUN sed -i "s/;date.timezone =.*/date.timezone = UTC/" /etc/php5/fpm/php.ini && \ 31 | sed -i "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" /etc/php5/fpm/php.ini && \ 32 | sed -i "s/display_errors = Off/display_errors = stderr/" /etc/php5/fpm/php.ini && \ 33 | sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 30M/" /etc/php5/fpm/php.ini && \ 34 | sed -i "s/;opcache.enable=0/opcache.enable=0/" /etc/php5/fpm/php.ini && \ 35 | sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf && \ 36 | sed -i '/^listen = /clisten = 9000' /etc/php5/fpm/pool.d/www.conf && \ 37 | sed -i '/^listen.allowed_clients/c;listen.allowed_clients =' /etc/php5/fpm/pool.d/www.conf && \ 38 | sed -i '/^;catch_workers_output/ccatch_workers_output = yes' /etc/php5/fpm/pool.d/www.conf && \ 39 | sed -i '/^;env\[TEMP\] = .*/aenv[DB_PORT_3306_TCP_ADDR] = $DB_PORT_3306_TCP_ADDR' /etc/php5/fpm/pool.d/www.conf 40 | 41 | RUN mkdir -p /data 42 | VOLUME ["/data"] 43 | 44 | EXPOSE 9000 45 | 46 | ENTRYPOINT ["/usr/sbin/php5-fpm", "-F"] 47 | --------------------------------------------------------------------------------