Docker image tailored to run Drupal
10K+
Docker image tailored to run Drupal 8/9
This repository is a source code for following Docker images:
version: '2'
services:
drupal:
image: touch4it/drupal-php-fpm-nginx:latest
expose:
- 80
links:
- mariadb:mariadb
depends_on:
- mariadb
db:
image: mariadb:10.3
environment:
MYSQL_ROOT_PASSWORD: drupal
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
expose:
- 3306
version: '2'
services:
drupal:
ports:
- 8080:80
volumes:
- ./drupal/private:/var/www/private
- ./drupal/sites:/var/www/html/sites
- ./drupal/themes:/var/www/html/themes
- ./drupal/modules:/var/www/html/modules
- ./drupal/libraries:/var/www/html/libraries
- ./drupal/etc/php/local.ini:/usr/local/etc/php/conf.d/local.ini
db:
volumes:
- ./db/init:/docker-entrypoint-initdb.d
- ./db/data:/var/lib/mysql
- ./db/dump:/dump
Use docker-compose up command to start your development environment.
You can directly execute Drupal Console commands from image command line, e.g.
drupal cache:rebuild
or
/var/www/html/vendor/drupal/console/bin/drupal cache:rebuild
You can build production ready image with Dockerfile like this:
FROM touch4it/drupal-php-fpm-nginx:latest
ADD . /var/www/html
This work is based on official Docker Hub php images. You can use docker-php-ext-install to add new extensions. More information can be found https://hub.docker.com/_/php/
You can add an ini file into $PHP_INI_DIR/conf.d directory
PHP 7
PHP 8
Content type
Image
Digest
sha256:713bf2ff8…
Size
288 MB
Last updated
over 3 years ago
docker pull touch4it/drupal-php-fpm-nginx