I have already told you what a VM (Virtual Machine) is and how to go about making one of your own. I also mentioned something called Vagrant which allows you to easily download images made by other people to hopefully speed up your development process. Well, you probably already know that technology does not really sit still for very long and so today we talk about a new Visualisation engine that has been kicking up a bit of a storm. Docker. It is still is a virtual machine but instead of one machine that provides your application, database and storage with Docker you may end up deploying several machines, one for each purpose.
To try and help you understand how it works we will use an analogy. I guess you all know what shipping containers are? You do..? Good. So imagine many shipping containers stacked on top of one another, each container is therefore a specific job but has the ability to communicate between one another. One container could be for transporting cars, another holds somebodies possessions as they migrate from one country to another. Yet another contains a vast quantity of plush Pokemon direct from china. Now you would not, for instance, put a car in a shipping container and then fill the car full of plush Pokemon. Well… you might, just for fun. But as fun as that sounds removing the Pokemon from the car on the other end of the trip would take a fair amount of time and effort. The great thing about shipping containers is that you can swap one out for another and everything will still just fit together. It does not matter what type of car or what type of plush Pokemon you have inside the idea is that they stack on top of one another for ease. Docker works under the same principle.
In theory (rarely in practice) it should not matter what type of Database you use for you application be it MySQL, PostgreSQL or even Oracle if your code is generic enough you should be able to swap out one for the other with minimal hassle. If you are running everything on one machine you have a great deal of worry about swapping one for another because the changes you make might bring down your whole live environment. If we stick with our container analogy in theory in the world of Docker you should be able to just swap out your MySQL container for a different database container with minimal configuration required.
Docker itself was originally released in 2013 but is still under fairly heavy development. They have just released a native app for both OSX and Windows which has been well received by the general developer community. Before the people who I work for took it on they wanted to know if it was going to be some sort of flash in the pan. This is when I had to get googling and found an article saying that Microsoft has already integrated Docker into its technology. If that was not convincing enough take a look at all the companies that have already integrated Docker like Uber, New York Times, GroupOn and lots more. So I set some time aside to learn a lot more about it and how it works but I will say that even with all the experience I have have found the learning curve quite steep. Last week after quite a lot of trial and error my fellow developers and I released our first product using Docker since then we have learned what we could do better and applied some patches to try and rectify that.
Docker is certainly very interesting in the way it does things and it may take me a few more weeks and a lot more reading to become fully efficient with it but I am getting there. Like all tools, there are probably places you don’t want to use it and I am sure that any expert that has come across its shortcomings will tell you exactly what that is, sadly I as yet can’t (apart from the learning curve). I don’t know how many of you would be interested in learning more about Docker, or at the bare minimum learning from what I know. I have often thought of producing some video stuff for GeekOut that deals with the basics of some of what I know. If enough people would like me to do a video demonstrating things like Docker, Vagrant and even some basic programming then I can find a way to do it. I often find videos on the internet that do not quite explain enough for me and think that there may be a better way to do it.