Docker container with Nginx and PHP5-FPM configured to run Drupal 8
Uses Supervisor to run all the processes
- PHP: 5.6.4
- Nginx: 1.9.12
To run the container with your Drupal8 code just run the next command replacing the path with your Drupal8 folder:
docker run -d --name=drupal8 -v /path/to/drupal8:/opt/code -p 0.0.0.0:80:80 urodoz/drupal8-php5fpm-nginx
The next docker-compose sample can be used to run a Drupal8 application linked to a mysql server and smtp server using the namshi/smtp docker image.
smtp:
image: namshi/smtp
mariadb:
image: mariadb:5.5.48
mem_limit: 512m
environment:
- MYSQL_DATABASE=drupal
- MYSQL_USER=drupal
- MYSQL_ROOT_PASSWORD=secretpassword
php:
image: urodoz/drupal8-php5fpm-nginx
ports:
- "0.0.0.0:80:80"
links:
- mariadb:mariadb.server
- smtp:smtp.server
volumes:
- "./drupal8/folder:/opt/code:rw"
Use the next command to build the image:
git clone [email protected]:urodoz/docker-drupal8-nginx-php5fpm.git
cd docker-drupal8-nginx-php5fpm
sh build.sh