Docker for Drupal 8, Thunder, Drupal 7 Web Applications
50K+
Alpha Version - This Docker is still in development
This Dockerimage is intented to be used as a Drupal Base Image for our Sites. You may use it, at your own risk. The Image is based on klambt/webserver (Dockerhub or Github) which is an enhanced image of php:7.0-apache.
This Docker is intended to be highly customizable, to:
It is possible to run it as a "Clean Install" or with an Preloaded Database (Update). Modules and Debian Packages can be added at Runtime or Build.
docker pull klambt/drupal:latest
docker build -t klambt/drupal:latest .
This Image will be updated if:
###TAGS
| tag | description | size |
|---|---|---|
| latest | currently drupal 7 for development purposes | |
| drupal-8 | Latest Drupal 8.x Version | |
| thunder | Latest Thunder Version | |
| drupal-7 | Latest Drupal 7.x Version | |
| drupal-6 | Drupal 6 Version - Just to test if we can be flexible with this docker (php:5.6-apache) |
In the next Section, we will describe howto use some of our customizing options. In the Example Section, we will describe some usecases (still in progress)
We will not support Core Hacks
There are several Methods to integrate & install Modules at Buildtime and Runtime to this Docker:
| option | description | Default Values |
|---|---|---|
| UPDATE_DEBIAN | Update Debian Packages | 1 = true |
| DEBIAN_INSTALL_PACKAGES | Install Debian Packages, seperated by "," | 0 = false |
| INSTALL_DRUSH | Install Drush | 1 = true |
| INSTALL_DRUPAL | Install Drupal | 1 = true |
| DRUPAL_INSTALL_MODULES | Install Drupal Modules, seperated by "," | 0 = false |
| GIT_PULL_CUSTOM | Pull Private Modules & Themes from GitHub | 0 = false |
| GIT_CUSTOM_SOURCES_SERVER | Git Server | github.com |
| GIT_CUSTOM_SOURCES_REPOS | Git Directory (for example klambt/docker_drupal) | 0 = false |
| GIT_USERNAME | Git Username | 0 = false |
| GIT_PASSWORD | Git Password | 0 = false |
| GIT_CUSTOM_MODULES_PATH | Modules Path inside the git repository | 0 = false |
| GIT_CUSTOM_THEMES_PATH | Themes Path inside the git repository | 0 = false |
| USE_NFS_CLIENT | Install NFS Client | 1 = true |
| option | description | Default Values |
|---|---|---|
| DEBIAN_INSTALL_PACKAGES | Install Debian Packages, seperated by "," | 0 = false |
| DRUPAL_USERNAME | Admin Username (User 0) | admin |
| DRUPAL_USER_PASSWORD | Admin Password | generated |
| DRUPAL_USER_MAIL | Admin User E-Mail Adress | [email protected] |
| DRUPAL_SITE_MAIL | E-Mail Adress of the Site | [email protected] |
| DRUPAL_MEMCACHE_SERVER | Linkname or Hostname to Memcache Server | 0 = disabled |
| DRUPAL_VARNISH_SERVER | Linkname or Hostip to Varnish Server | 0 = disabled |
| DRUPAL_VARNISH_KEY | Varnish Key to Ban Content on Varnish Server | --- |
| DRUPAL_INSTALL_MODULES | Install Drupal Modules, seperated by "," | 0 = false |
| MYSQL_DATABASE | Drupal Database | drupal |
| MYSQL_USER | Username | drupal |
| MYSQL_PASSWORD | User Password | drupal |
| MYSQL_LINK | Linkname or Hostname to Database Server | database_server |
| GIT_PULL_CUSTOM | Pull Private Modules & Themes from GitHub | 0 = false |
| GIT_CUSTOM_SOURCES_SERVER | Git Server | github.com |
| GIT_CUSTOM_SOURCES_REPOS | Git Directory (for example klambt/docker_drupal) | 0 = false |
| GIT_USERNAME | Git Username | 0 = false |
| GIT_PASSWORD | Git Password | 0 = false |
| GIT_CUSTOM_MODULES_PATH | Modules Path inside the git repository | 0 = false |
| GIT_CUSTOM_THEMES_PATH | Themes Path inside the git repository | 0 = false |
| DRUPAL_FILE_NFS_DIR | NFS location of /sites/default/files | 0 = false |
| USE_NFS_CLIENT | Install NFS Client | 0 = true |
| DRUPAL_FILE_NFS_DIR | nfs path for /sites/default/files | 0 = false |
| NFS_OPTIONS | NFS Mount Options | --options=nolock,exec |
| path | description |
|---|---|
| conf/ | Configuration Files |
| custom_modules/ | Custom Modules to be integrated at Build |
| custom_themes/ | Custom Themes to be integrated at Build |
| scripts/klambt_docker_*.sh | Logic to get everything up and running |
| Dockerfile | tag:latest |
| path | description |
|---|---|
| /var/www/html/ | Drupal Base |
| /var/www/html/sites/default/files | Public Files |
| /var/www/private | Private Files |
| /tmp/drupal | Temp Files |
| /var/www/html/sites/all/modules/custom | Custom Modules |
| /var/www/html/sites/all/themes/custom | Custom Themes |
| /usr/local/bin/klambt_docker_*.sh | Configuration Scripts |
The following example for Development, will start an clean installed drupal, with working memcache, varnish, solr integration. It is intended to get a working Drupal Installation up in couple of Minutes.
Since it is a Development Deployment, we will expose the Ports:
We will need three files in the same directory.
docker-compose.yml
version: '2'
services:
drupal_memcached:
image: memcached:alpine
container_name: drupal_memcached
networks:
- klambt_drupal
drupal_database:
image: mysql:5.7
container_name: drupal_database
networks:
- klambt_drupal
ports:
- "3306:3306"
env_file:
- ./database.env
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: drupal_phpmyadmin
networks:
- klambt_drupal
ports:
- "81:80"
depends_on:
- drupal_database
drupal_webserver:
image: klambt/drupal:latest
container_name: drupal_webserver
networks:
- klambt_drupal
env_file:
- ./database.env
- ./drupal.env
- ./varnish.env
depends_on:
- drupal_database
privileged: true
drupal_varnish:
image: klambt/varnish:latest
container_name: drupal_varnish
networks:
- klambt_drupal
env_file:
- ./varnish.env
ports:
- "80:80"
expose:
- "6082"
depends_on:
- drupal_webserver
drupal_solr:
image: klambt/solr
container_name: drupal_solr
networks:
- klambt_drupal
expose:
- "8983"
networks:
klambt_drupal:
driver: bridge
drupal.env
DRUPAL_USERNAME=admin
[email protected]
[email protected]
DRUPAL_MEMCACHE_SERVER=drupal_memcached
DRUPAL_VARNISH_SERVER=drupal_varnish
DRUPAL_LOCALE=de_DE
database.env
MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=drupal
MYSQL_USER=drupal
MYSQL_PASSWORD=drupal
MYSQL_PORT=3306
MYSQL_LINK=drupal_database
varnish.env
DRUPAL_VARNISH_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
BACKEND_SERVER=drupal_webserver
BACKEND_STYLE=drupal-7
Starting up our Service with a single command:
docker-compose up
more documentation to follow
Content type
Image
Digest
Size
236.7 MB
Last updated
over 8 years ago
docker pull klambt/drupal