comparison of Drupal Docker-based
dev-environments
Alexander Dubovskoy
www.ra-don.ru
We're a distributed team.
Sometimes we do local events
To see how they are doing now
Why?
+
=
how does they works?
Cgroups
Groups of processes
Resource allocation for groups
Namespaces
Isolation. PID/NET, etc namespaces
Capacities
This breaks up root privileges into smaller and distinctive units
Cgroups
Groups of processes
Resource allocation for groups
Namespaces
Isolation. PID/NET, etc namespaces
Capacities
This breaks up root privileges into smaller and distinctive units
Docker
+ networks + conainer + ...
Cgroups
Groups of processes
Resource allocation for groups
Namespaces
Isolation. PID/NET, etc namespaces
Capacities
This breaks up root privileges into smaller and distinctive units
Docker
+ networks + conainer + ...
Lando / DDEV / Tokaido / Docksal
Docker4Drupal is not!
Mike Pirog | thinktandem.io
104 contributors
yes
Who:
Community:
Specialized on drupal:
.lando.yml
name: my-lando-app
recipe: drupal8
config:
webroot: web
i like it
.lando.base.yml
.lando.dist.yml
.lando.upstream.yml
Base file
.lando.local.yml
Overrides for local development
Lando commands
Great solution for codesprints
3 steps / 3 minutes
1
You can Install it from github release
or from your linux official repository
lando init \
--source remote \
--remote-url https://www.drupal.org/download-latest/tar.gz \
--remote-options="--strip-components 1" \
--recipe drupal8 \
--webroot . \
--name my-first-drupal8-app
2
3
#plugins/lando-recipes/types/drupaly/builder.js
'use strict';
// Modules
const _ = require('lodash');
const LandoLaemp = require('./../laemp/builder.js');
const semver = require('semver');
const utils = require('./../../lib/utils');
// "Constants"
const DRUSH8 = '8.2.3';
const DRUSH7 = '7.4.0';
weird moments
- FAT Dockerfile
- nodejs-based + bash (not so easy to read)
- Hardcoded versions inside js
what's about Production?
Not ready for production (issues about docker-composer export has been denied "until infrastructure will be ready").
recipes
Services
Randy Fay | https://randyfay.com/
48 contributors
yes (because Randy)
Who:
Community:
Specialized on drupal:
The main installation way: brew (linuxbrew)
Uncomfortable for linux-users
curl -L https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh | bash
install_ddev.sh & ddev start needs sudo
DDEV commands
Configuration
config.yaml
docker-compose.yaml
APIVersion: v1.7.1
name: ddev
type: drupal8
docroot: web
php_version: "7.2"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
mariadb_version: "10.2"
webcache_enabled: false
nfs_mount_enabled: false
provider: default
version: '3.6'
#ddev-generated
services:
db:
container_name: ddev-${DDEV_SITENAME}-db
image: $DDEV_DBIMAGE
stop_grace_period: 60s
volumes:
- type: "volume"
source: mariadb-database
target: "/var/lib/mysql"
volume:
nocopy: true
- type: "bind"
source: "."
target: "/mnt/ddev_config"
restart: "no"
user: "$DDEV_UID:$DDEV_GID"
ports:
- "127.0.0.1:$DDEV_HOST_DB_PORT:3306"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.platform: ddev
com.ddev.app-type: drupal8
com.ddev.approot: $DDEV_APPROOT
com.ddev.app-url: $DDEV_URL
environment:
- COLUMNS=$COLUMNS
- LINES=$LINES
command: "$DDEV_MARIADB_LOCAL_COMMAND"
healthcheck:
interval: 5s
retries: 12
start_period: 60s
web:
container_name: ddev-${DDEV_SITENAME}-web
image: $DDEV_WEBIMAGE
cap_add:
- SYS_PTRACE
volumes:
- type: bind
source: ../
target: /var/www/html
consistency: cached
- ".:/mnt/ddev_config:ro"
- ddev-composer-cache:/mnt/composer_cache
- ddev-ssh-agent_socket_dir:/home/.ssh-agent
What's inside
- Build scripts are written in go (much easier to read then JS)
- FAT Dockerfile
- ENV for versions (good)
RECIPES
- Drupal 6/7/8
- TYPO3
- WordPress
- Backdrop
docksal.io
Oleksii Chekulaiev & Leonid Makarov
docksal.io
41 contributors
no but yes :) thx FFW
https://docksal.io
Who:
Community:
Specialized on drupal:
Installation
- Docksal will reinstall docker/docker compose on your system
What's about production?
- Lack of documentation about production. You CAN export
settings for docker-compose (created manually):
fin docker-compose config -
https://github.com/lmakarov/docksal-prod-poc - production
settings example (tnx FFW & @lmakarov)
RECIPES
- Drupal 7/8
- WordPress
- Laravel
- Magento
- Grav
SERVICES
Docker 4 drupal
Chingis Sandanov
38 contributors
yes
Who:
Community:
Specialized on drupal:
- Ruby (rails)
- Python
- PHP (good base Docker-based PHP stack)
- WordPress
- Drupal 7/8
RECIPES
Services
Nginx | 1.16, 1.15 |
Apache | 2.4 |
Drupal | 8, 7 |
PHP | 7.3, 7.2, 7.1, 5.6 |
MariaDB | 10.3, 10.2, 10.1 |
PostgreSQL | 11, 10, 9.x |
Redis | 5, 4 |
Memcached | 1 |
Varnish | 6.0, 4.1 |
Node.js | 12, 10, 8 |
Drupal node | 1.0 |
Solr | 7.7, 7.6, 7.5, 6.6, 5.5 |
Elasticsearch | 7, 6 |
Kibana | 7, 6 |
OpenSMTPD | 6.0 |
Mailhog | latest |
AthenaPDF | 2.10.0 |
Rsyslog | latest |
Blackfire | latest |
Webgrind | 1.5 |
Xhprof viewer | latest |
Adminer | 4.6 |
phpMyAdmin | latest |
Portainer | latest |
Traefik | latest |
Tokaido
Jimmy Cann & Mike Richardson
2 contributors
yes
Who:
Community:
Specialized on drupal:
Tokaido: server-grade local dev environment for Drupal developers
QUICK tour
- Written on go
- For Mac-users (hasn't linux builds yet)
- templates (like .gitignore, docker-compose) inside .go files
Which one would you choose?
Lando | DDEV | Docksal | Docker4Drupal | Tokaido | |
---|---|---|---|---|---|
Easy to install | |||||
Documentation | |||||
Video tutorials & conferences | |||||
Popularity | |||||
KISS / clean | |||||
For drupal teams | |||||
For mixed teams | |||||
Production ready | |||||
Flexible | |||||
Total | 33/45 | 38/45 | 36/45 | 42/45 | 20/45 |
complicated
And something else
- Docker stack & docker compose
- https://www.drupal.org/docs/develop/local-server-setup/docker-development-environments
Why fat containers bad. Docker ideology:
- the smaller the container the better
- one conainer one process
- use cache
Та!
questions time.
If 5 minutes not enough for that, we will discuss all your disagreement on the afterparty
drupalcamp.by
By Alexander Dubovskoy
drupalcamp.by
Docker dev tools: lando, ddev, docker4drupal, etc..
- 1,715