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.
Here's (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
I 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.
We 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.
- 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.
Agreed, 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.
I feel like I've already linked to my blog too much, but please take a look at 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.
tryrethink.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)
Stating a roadmap is never easy, but hugely important for keeping the Docker team accountable. I believe that getting to a 1.0 release with the same fervor from the community will be a great indicator of future viability and success. That sets a pretty high bar.
We are pretty much forced to set this high bar because of the rate at which organizations large and small are adopting Docker. We will do everything we can to live up to the expectations!
Have you seen docker-py[1]? Bindings for other languages also exist, but the main theme is that the docker host can be controlled (if configured that way) by external machines.
It's unfortunate that it requires a 3.8 kernel, as getting those to work on most machines has been in my experience rather difficult. I had to downgrade back to 3.2 on a Ubuntu server because it wouldn't boot with 3.8. I was able to get it to work on a DigitalOcean fresh VM, but unless I want to migrate everything to a fresh VM, which I don't, I don't see myself using it for a while.
Broader compatibility (including reducing kernel dependency) is a major part of this push. There are a number of workarounds today (e.g. patching the kernel, deploying as VM) which are discussed on http://www.docker.io/gettingstarted/
But, obviously, such workarounds aren't practical in every environment.
Just an FYI - tryrethink.info and my blog (nick.stinemat.es) are both running on 3.2.0-48. While it is not the recommended configuration, I haven't had any kernel related issues.
If this was going to be possible with Windows, it would have to be done by Redmond. And given that they'd be out of a Windows license by allowing containers w/in Windows (as opposed to VMs), I doubt that will happen.
Unless you're talking about running this as a Linux VM on a Windows host, in which case, sure - why not?
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.