Lately I’ve been messing quite a bit with Docker and my mind is pretty blown about how awesome it is. Remember that feeling you had the first time you launched a vagrant instance and had a virtual machine running with your web application in just a few minutes? That’s the feeling I have again playing with docker… pure awesomeness.
Docker is essentially a wrapper around Linux Containers that makes them usable for mere mortals. With docker I can essentially take my application and all of it’s dependencies, bundle them up into a re-usable image and say “Here, run this!” This has a lot of implications for testing, for repeatability and for system provisioning. I must say it is quite impressive to be able to launch a vagrant box and then run multiple isolated instances of services like rabbitmq or redis inside of it.
It’s easy to try out… if you don’t already run linux you can clone the docker repository and try it out in a vagrant virtual instance. There is also a docker puppet module that you can use to install docker on your own machines if you use puppet. Walking through the examples is a good place to start, once you get a good feel for things you can check out the index for containers that others have shared (there’s some good ones out there, especially the ones published by heroku that emulate their stacks).
For fun, I created an image of a rabbitMQ server. After some trial and error I created the following Dockerfile to build a new image from.
Now to generate a new image I just run “docker build < Dockerfile" and wait. Once it is done I am given an image id for the generated image which I can use to tag the image (for those of you following along, "docker tag