Docker for
local
Drupal development
Docker?
History of
Local Development
1. Local Installation
like Acquia Dev Desktop, MAMP, LAMP, XAMP, etc.
- Hard to install
- A lot of dependencies on Operating System
- No multiple Versions
- Never ever the same as production
2. Virtual Machines
Vagrant, VirtualBox, etc.
- Installing/Provisioning takes a lot of time
- Needs a lot of space & resources
- Hard to build the same system as production
3. Docker
- No installation per site/container
- Less usage of space and resources
- Can be the exact same as in production!
How does Docker work
Virtual Machines
Docker
Main Docker Concept
Docker Image
- Fully Provisioned
- Includes everything needed to run
- Can build on top of another Image
- Built via Dockerfile
Docker Image Registry
- Provides Docker Images
- Saves them as Layers (faster sync)
- Public one: hub.docker.io
- Private ones
Docker Container
- Built from Docker Image
- Is what actually runs
- Can mount external files
1. Docker Images are built
2. Docker Image pushed to registry
3. Docker Images are pulled from registry
4. Docker Container created from Image
OK, but why?
- Provisioning happens before (ultra fast start of containers)
- Everything needed to run is inside an Image
- Runs everywhere
Why Docker?
- No long waiting
- Everything already there
- Runs on Linux, Mac, Windows
Why Docker for Local Development?
Okay, let's start!
How to use Docker
- Build Docker Images yourself
- Use existing Docker Images
Build Docker Images yourself
- You need knowledge about Hosting
- You need knowledge about Docker
Existing Docker Images
- NOT: hub.docker.com/_/drupal/
- github.com/peperoni60/drupal-docker
- dropdock.io
- www.kalabox.io
- drude.io
- docker4drupal.org
- dockerdrupal.readthedocs.io
- amazee.io
- All Services in one:
PHP, Nginx, Varnish, Solr, Drush, Composer, Console, Xdebug, Blackfire - Fully Maintained & Supported
- Supports custom nginx, solr configs
- All configs for Drupal
- Nice URLs
- Easy Helper Tools
docs.amazee.io
Docker Local Drupal Development
By Michael Schmid
Docker Local Drupal Development
- 2,475