mark.a.pernotto

father / developer / optimist

Docker

Nov
04

I discovered a new tool over the course of last week. It’s called Docker, and it’s an container-based application management solution. There’s a Community Edition, which is free, which allows me to install an application on my local machine and immediately begin working on that application.

I’ve never had the opportunity to play around with something like this before, but now that I’ve seen this in action, I’m hooked! I specifically like that I can declare which packages I’d like to employ and use in a single configuration file – even specifying the version of the software that I’d want to use.

What’s beautiful about this, is that I can instantly declare software that I want to use in my project, and then through a command line, add that software to my project. If I was going to add a docker-supported image to a project, I can define that image, as well as the version and the port needed. Need to use different versions of the same piece of software? Probably not a problem – but you’d need to make certain that you are addressing the correct port of the software you’d like to use.

For example, let’s say I am working on two different projects, using two different versions of MySQL. For ProjectA, I need to make the latest stable release, 5.7.20. However, for ProjectB, for whatever reason, I need to make sure that I run an older version – let’s say it’s 5.5.58. In my configuration file, I’d need to specify a different port for MySQL for ProjectB from what I used in ProjectA.

I like command-line interfaces (CLI), harkening back from my early computing/DOS days. A full list of Docker commands can be found here. But there is an application you can install to start/restart if you’d like, and there’s another application called Kitematic that serves as a GUI-enabled version of these command-line prompts.