5 ms·
I'd like to see a "docker for web developers" post / guide. I want to know how to write a dockerfile (?) that I can run a command against, and have a dev envir
by uses 13y ago
I'd like to see a "docker for web developers" post / guide.
I want to know how to write a dockerfile (?) that I can run a command against, and have a dev environment materialize. Something I can track in source control along with my "main" source. Something to replace the difficult-to-recreate and outside-of-source-control LAMP and Flask environments I have now.
And I'd like to know how my sites' source code or untracked files (e.g. .sqlite file, mongo dump files) fall into that, while still being accessible to the docker container.
I imagine this would cover a huge percentage of people interested in Docker.
- lsllc 13y agoAgreed, most of the tutorials I've seen so far have been along the lines of frio's answer -- ie you pull someone else's pre-build docker image (or docker file) and use that.
- nickstinemates 13y agoI feel like I've already linked to my blog too much, but please take a look at http://nick.stinemat.es http://nick.stinemat.es . I go through setting up Docker, to building my apps with Docker, to running a huge site on Docker. If you're looking for more content, I'll be happy to provide it.
- xnxn 13y agoDon't feel bad about linking to your blog -- even with the few posts it has, it was an invaluable resource in helping me get started with Docker. Please keep writing!
- frio 13y agoHere's (https://github.com/frio/cloud9-dockerfile https://github.com/frio/cloud9-dockerfile) something vaguely along those lines -- a basic popup IDE using Cloud9. It's not a complete solution (and probably never will be) but it made me happy :). You can run it with: git clone https://github.com/frio/cloud9-dockerfile cd cloud9-dockerfile docker build -t "yourname/cloud9" ./ docker run yourname/cloud9 -e PROJECT=git@github.com:your/project ... and then opening your-ip:3131 :).
- nickstinemates 13y agotryrethink.info and my blog are both flask apps. The one thing I haven't written about is databases/persistent storage in containers (as the tryrethink sites are ephemeral) Would this be helpful?
- bjt 13y agoTwo thoughts: - Docker is entirely dependent on LXC at the moment, so if you're developing in anything other than Linux, it's not a good solution for creating a dev environment. They're promising to make LXC just a plugin at some point and support BSD jails, OpenVZ, and other containers, but even then I'm not sure there will be an answer for OSX users. - You can do just what you describe above with a Vagrantfile. It works cross platform already.
- nickstinemates 13y agoOSX supports `chroot` which could be a target on OSX.
- jaytaylor 13y agoPerhaps ShipBuilder is right up your alley. ShipBuilder is an open-source Heroku-esque PaaS which uses Go, Git, LXC, and HAProxy, with Docker support coming soon! The Shipbuilder codebase is super easy to understand, and aims to make it fast and easy to deploy arbitrary web-applications. Get total control over all aspects of your staging and production environments. More info: http://shipbuilder.io/ http://shipbuilder.io/ https://github.com/sendhub/shipbuilder https://github.com/sendhub/shipbuilder
- consciousness 13y agoI tried out SB today and so far I am impressed...it ran my Django app with zero issues. Definitely planning on pushing my company to start using this for their deployments instead of Heroku.
- the_fc 13y agoHas anyone tried this other Go-based Paas? http://globocom.github.io/tsuru/ http://globocom.github.io/tsuru/
- crashoverdrive 13y agoI looked at it but it seems overly complicated, I got ShipBuilder up and running in a flash
- tgoldberg 13y agoWe just discovered ShipBuilder yesterday, yet already I have a very good feeling about it. We're planning on trying it out on a disposable AWS instance this weekend.