No, in this post I’m not going to sell you on the virtues of deploying your application on docker. A lot has been written about it and a lot more will be. People have also written about how bad docker is and how not so bad it is.

This post is especially for all of you developers who don’t deploy your applications with Docker. Because those of you who already use docker in your delivery cycle already know what I’m going to say and find it obvious.

I’m sure at some point you’ve had to install Redis, Mongo, Couchbase, MySql, ElasticSearch, RabbitMq or some other similar software to run a one-off test, because of the requirements of a short-lived project, or to do a spike and decide whether you finally bring that piece into your infrastructure or not.

Before containers, the usual thing was to install the software in question on our machine, or maybe resort to a virtual machine. The virtual machine was common practice when we knew the software we were installing was going to wreak havoc on our machine, whether as crap spread all over the system or as a 500 kg slab on performance.

Well, now we have one more option, with the isolation advantages of virtual machines but way simpler. Thanks to docker hub we have official images of all the programs mentioned above and many more just a “docker run” away. We even have some unofficial ones that can be very helpful, like Oracle. Yes, Oracle, because who the heck wants to install Oracle to run 4 tests when you can pull a preconfigured image!

If the images are well made (they usually are), you can even customize how the application works. For example, the Redis image is ready for you to use your own “redis.conf” or simply to use redis with a password.

By the way, although the images in the Microsoft repository aren’t yet considered official within Docker hub, they’re Microsoft’s official ones, they’re trustworthy 😉

The way I’ve put it, it sounds like using Docker during development is only good for running tests. Well, no, you can use it day to day and avoid polluting your system with installs you then have to update every so often, piling up more and more “leftovers”.

One last DIY tip: If you get the chance, try to use the versions tagged “alpine”. Obviously, the “alpine” versions are based on Alpine Linux, a “security-oriented” distribution that weighs just 5Mb. In most cases, considering that all we want to try is the software in the image we’ve pulled, it’ll be enough. For reference, the Redis “latest” image takes up 74Mb and the “alpine” one only 8Mb.