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 '14 at 12:43

I am creating an image to help me test Craft.



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 '14 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 '14 at 16:39
  • I'm giving it a shot now. Will let you know my success as well. Nov 17 '14 at 16:59
  • This may (or may not) be helpful: laracasts.com/lessons/say-hello-to-laravel-homestead-two Nov 17 '14 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 '14 at 3:42

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 '14 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 '14 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


Looks like the craft team has a docker setup on their GitHub now. Lots to dig through with many options (PHP-FPM, nginx, mysql, etc).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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