Trellis: Vagrant vs. Docker - Will the Switch Ever Happen?

Hello there,

After reading a number of posts on people making the switch from using the “heavier and slower” Vagrant to the nimbler Docker, I’m wondering if Trellis will ever make the switch to Docker?

Also, after looking at the general trends of the two:,docker - It makes me feel like Docker would be the more future-proof bandwagon to jump on.

This honestly is just a lot of ignorance talking and I wanted to see what the community’s opinion was on this.

Any feedback would be appreciated!


I’ll just leave this here ᕕ( ᐛ )ᕗ


Docker containers are for the final version of a production ready piece of software.

Docker containers work best when your web app is built with scalability in mind, when you intend your app to end up in a like environment.

In Docker, instead of running recipes to provision a server that, at the end of a sometimes very long process, also includes your WordPress code somewhow, you instead drop a git looking binary blob into your target and you are done. It’s faster! Faster for … production deployments

My experience with developing PHP on Docker is that it sucks. File mapping does not work the same way. The whole save then refresh the browser to see changes workflow doesn’t work very well in Docker.

The Docker development flow is better suited for developers that recompile and/or restart their web server every time they save their files (Think: Typescript, Node.js, Python WSGI, Java … )

Furthermore, Trellis is not deploying Vagrant into production? You can certainly jiggle your settings and end up with Docker there if you need that kind of scalability?

Things are improving for PHP on Docker though. If you want to play around with Docker check out:

I’m not against it, but there is certainly a lot of misunderstanding circulating for who or what Dockers was built for, where PHP Developers are last on the list.


My WordPress dev workflow involves lots of wp-cli use – ie, to inspect the data, update options, create dummy content etc,

I’ve found using wp-cli with docker to be somewhat tricky to get working flawlessly. Granted, I haven’t spent too much time figuring it all out, but following this post got things working sort of.

I can certainly see the benefits of Docker + WP, but it’s also some new territory, so ‘here be dragons’. Exciting, but one more new shiny thing to learn before the looming work deadline :wink:

From my usage of Trellis, it just feels more targeted to the traditional server stack, which I like. So one possible solution I can see is to create a new project in the roots family – one geared more to using / deploying WP to containerized environments.

@daniel I’m using bedrock+roots with capistrano (for deploys) with stacker (docker)

Trellis is nice a thing but when you have to handle a lot of projects parallel the provision time gets annoying and on small macbooks for example the disk space is kinda important too which isn’t in favor of trellis.



I’ve built a neat development setup for Bedrock with docker over here:
Would love to get some feedback - so if you happen to have some time: try it and drop me a line if you like it or not. I’m happy to assist if you run into any problems.


Hey there,

I am also using Docker for my local development environment. As I used Laradock before, I adapted it to work with Bedrock and optimized for the usage with WordPress. The server setup is completely configurable, you can choose between different database servers (e.g MariaDB or MySQL), web servers, (e.g NGINX, Apache2 or HHVM), and PHP versions (5.6+). Actually, there are still some containers that are probably not used in common WordPress environments. I plan to check and test each service, especially HAProxy for load balanced setup.

Another goal is then to add Ansible or comparable deployment configuration and to optimize the stack for the use in production.

You can find the repository and instructions here: