Has anyone had success with setting up Craft using Docker?

I've stumbled across some Dockerfiles for WordPress and other CMS's but couldn't find much in the way of Craft. I'll be exploring this a bit myself over the next week, but was hoping some people in the community may have a few good pointers or tips or even cautions.

To elaborate, I'm looking for alternatives to MAMP as well, or other development environment tools for working with Craft.

  • I've been looking at Docker too, I'll be watching for your findings!
    – Tim Kelty
    Nov 11, 2014 at 12:43

7 Answers 7


I've been using Laravel Homestead for local dev (and Forge controlled VPS' for staging). Both have been hugely successful for me – I've not touched MAMP for months.

Craft works off-the-shelf with both.

  • Niceeeeeee. Thanks for this. Giving it a shot now! Nov 17, 2014 at 16:37
  • I notice Homestead 2 was just announced today, I've not had a chance to try this version yet but I'd guess it should all be fine. Nov 17, 2014 at 16:39
  • I'm giving it a shot now. Will let you know my success as well. Nov 17, 2014 at 16:59
  • This may (or may not) be helpful: laracasts.com/lessons/say-hello-to-laravel-homestead-two Nov 17, 2014 at 18:06
  • So it definitely works. However, I noticed that once I run homestead destroy, my database is purged. Do you connect to a remote database or one locally? If locally, how do you keep it from being destroyed when you restart your machine or homestead? I did notice the suspend command, but wonder what happens if I forget :x Nov 18, 2014 at 3:42

I am creating an image to help me test Craft.



For anyone who is interested - I did a quick mashup of the Craft and Laravel Homestead documentation to outline the process I went through for setting up my first Craft site locally on a Vagrant/Homestead box.

Thanks to the guys over at Straight Up Craft for the video about Vagrant and Craft which introduced me to Homestead



You might want to check out this tutorial on using vagrant with craft. You could use this as an alternative to MAMP. http://straightupcraft.com/articles/setting-up-craft-with-vagrant

  • Awesome thank you. Nov 17, 2014 at 16:38
  • Cool this actually touches on more options other than homestead as well. I got homestead working, and will be giving Forge a go again in light of all this, as well. Nov 17, 2014 at 18:25

Yes I have. I even wrote an article that describes the application I created to automate the install process less than two minutes.

CraftCMS + Docker Dev Environment in seconds


As of today the Craft docs note deprecating Nitro in favor of DDEV or similar projects.

There is also some good content on Craft Quest about using DDEV.


Here's a Docker setup for Craft CMS as a Composer project:


Here is a full Craft website in Docker that you can spin up locally:


...and here is a comprehensive article on the Docker setup:




  • That docker article is super in depth. Probably a really good option for those who want to roll their own setup and are afraid to get their hands dirty! Aug 24, 2022 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.