Docker for Drupal (Docker4Drupal) for Local Instances

Still using that old WAMP or XAMPP environment for your local instance of Drupal?

Have you heard how sexy Docker can be?

It’s not easy to be on top of every trend that arises in web development, but there are some that will truly make your life easier, and this is one of those rare trends. In this post I won’t cover the Docker basics; there are plenty of blog posts about that. Instead, I’ll focus on how to have a complete local instance for Drupal easily and quickly.


 What is Docker4Drupal?: Docker4Drupal is a set of Docker containers optimized for Drupal.

By just downloading a docker-compose.yml file, you’ll have a complete Drupal local environment ready to spin up your development process. Here is a list of the containers/features you can have:

  1. Nginx 1.10
  2. Drupal 8, 7, 6
  3. PHP 5.3, 5.6, 7.0, 7.1
  4. MariaDB 10.1
  5. Redis 3.2
  6. Varnish 4.1
  7. Solr 5.5, 6.3, 6.4
  8. Memcached 1.4
  9. Mailhog
  10. phpMyAdmin
  11. Node.js 7
  12. Traefik

You can have them all, or just the ones that you need. Just comment/uncomment the docker-compose.yml file to fit your needs.

Important note if you have a MAC: They recommend using docker-sync instead of the Docker native due to sync speed. I have tested both and do not see a real difference. So feel free to test, but I’d recommend avoiding any extra configurations and stick with the Docker native behavior.

If you decide to go with the docker-sync, and it starts failing (as happened to me), just run docker-sync clean. You can thank me later.

Need help with Drupal? Give us a call or shoot us a message and we’ll sort it out for you. 

Do you need some help?

Let's get started. Tell us a little about yourself and your organization
and we can start a conversation about your needs and our capabilities.

Related Posts