6

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
3

I am creating an image to help me test Craft.

https://github.com/gabrielmoreira/docker-craft

2

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

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

https://medium.com/@mattcollins_6/setting-up-a-local-dev-environment-for-craft-cms-using-laravel-homestead-2724be3954a5

1

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. – Bill Columbia 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. – Bill Columbia Nov 17 '14 at 18:25
1

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

1

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.