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:
- Nginx 1.10
- Drupal 8, 7, 6
- PHP 5.3, 5.6, 7.0, 7.1
- MariaDB 10.1
- Redis 3.2
- Varnish 4.1
- Solr 5.5, 6.3, 6.4
- Memcached 1.4
- Node.js 7
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.