Hey IHers,
I've just shared my basic docker setup for new laravel projects on github's gists: https://gist.github.com/lostdesign/3c8caabf703ff40b6d3ae336b58e0c8e
Buddy of mine needed some help so I thought why not share it with everyone here. It's meant to quickly setup a local dev environment w/o reading much docs.
What's your opinion about Homestead?
Too heavy for my taste - docker enables me much quicker than homestead does.
huh, interesting. Care to share your insights? I only go by homestead cause I barely work with laravel but I'm interested as I'm about to join a bunch of hacktivists that mainly work with laravel :)
If you wish to use this in production, I think you should specify a tag for nginx. Otherwise some updates in the future may break your deployment. Also, should xdebug be there? You can also reduce the image size easily with multi stage builds or simply by deleting cache files at the end. I managed to build a 38mb docker image for my php projects which has all the extensions I need. Let me know if you need them, I will make a gist.
Thanks for your insight, this is mainly for local dev environments for people that are new to docker and don't want to deal with learning the whole thing.
I'll go ahead and apply the improvements you've mentioned, so thanks for that. If you can share that gist I am more than happy to review and learn from it!
If it was intentional and only for development, then I think you already know what you need for production. But I think other people can benefit from this, so here it goes
https://gist.github.com/nazmulpcc/2368c5bd358dc42e560e5634379b7536