Dockerizing Drupal


The biggest challenge for any web development agency is to kickstart project development with the same environment configurations across dev and local servers. While searching for an efficient solution to this situation we landed on Docker. With environment portability gaining popularity, Docker has became a favorite and in our experience with it we can say that Docker is freakishly awesome! It's super fast and very easy to setup.

Our main goals were:

  1. Easier local instance setups i.e. faster kickstart with any project, any developer.
  2. Consistent environment for all instances - local, dev, staging and production
  3. Increase in productivity by improving our development and deployment processes
  4. Improvement in quality by creating automated test environments based on docker scripts.
  5. Isolation and security - When we run any process inside container it is independent from the host, which provides additional security.

What this session will contain:

  1. Understand Docker
  2. Difference between docker and VM
  3. DockerFile and Image Building
  4. Complete Drupal setup using micro services and containers
    1. Ubuntu
    2. PHP FPM
    3. Apache
    4. Mysql
    5. Memcache
  5. Persistent logs and mysql database
  6. Deployment with Docker containers
  7. Initialize whole environment with one single command
  8. Setting up different environments

Disclaimer: We’re yet to use Docker on production as we are not certain of how a live site will react with different types of logs and statistics enabled.

Session Track

Coding and Development

Experience Level


Drupal Version