Drupal VM has been hitting its stride this year; after adding experimental Docker support in 4.5, Docker usage has been refined in 4.6 (with a more stable and useful drupal-vm Docker image, along with a few other things:
- Drupal VM now supports running inside a Debian 9 'Stretch' Vagrant box (Packer build here, and Vagrant Cloud box here), or in a Docker container based on Debian 9.
- The official Docker image includes a script that lets you set up a fresh Drupal site (any version supported by Drush!) with the command
docker exec drupalvm install-drupal
(seriously, check it out!. - Essential Vagrant plugins that automatically update your hosts file and ensure the VM has the right version of VirtualBox Guest Additions are now automatically installed—though you can disable the feature, or even add in additional essential plugins if you so desire.
I think the fact that adding Debian 9 support took less than one hour is a testament to the approach we've* taken with Drupal VM. Every component is mixed in from an upstream Ansible role—all the roles work on multiple OSes, and have full automated test coverage on all those OSes, and are easily composable (Drupal VM is one of many diverse projects that benefit from the roles' modularity).
And taking the note about the Docker image's Drupal install script a little further, if you have Docker installed, try the following to see how quick it is to get started with Drupal VM on Docker:
docker run -d -p 80:80 -p 443:443 --name=drupalvm --privileged geerlingguy/drupal-vm
docker exec drupalvm install-drupal
(optionally add a version after a space, like8.4.x
or7.56
).- Open your browser, and visit http://localhost/
Read more about using Drupal VM with Docker in the official documentation.
I'm beginning some exciting experimentation using Ansible Container to build Docker images 1:1 to many of the Ansible roles I maintain, and I can't wait to share some of the optimizations I'm working on that will make Drupal VM continue to be one of the most flexible and performant development (and even production!) environments for PHP projects.
- I say we've, because I am extremely indebted to many consistent contributors to Drupal VM and all the upstream projects. Were it not for their hard work and ideas, I would likely not have tidied up a lot of these niceties in time for a 4.6 release! Thanks especially to co-maintainer oxyc, who somehow has time for fixing all the hard bugs :)
Comments
Great stuff. I tried those 3 steps and they succeed for me.
...and Drush is the glue that makes it work so nicely, so thanks for all you've done to make this a painless process!
Is this something that would work on a windows based machine Jeff? Drupal VM that is thanks
Yes; see docs.drupalvm.com for some notes on usage within Windows.