Every program that is popularized has a beginning where people want a change or an improvement on existing. Docker is no exception. Dockers was a group of developers back in 2010 and launched in 2011 but only debuted in 2013. The idea of using something known as a container has been around for years but this was the first to offer a complete ecosystem for container management. For more information on the history of the predecessors of the bins, here is a blog that quickly goes over the history up to modern day.
What is a Container?
From the dockers website a container is described as
“a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.”
What does this mean exactly? To understand this question we must understand why dockers came to be and why it was a necessary change in the world of containers. In the world of computing, we often use packages, libraries, and others softwares to run, however there is a risk as these can interfere with each other. Prior to the creation on the docker system, the solution to prevent interference was the use of a virtual machine by creating a separate hardware for theses actions to run to reduce conflicts. For anyone that has used a virtual machine will know that this is not a good solution as virtual machines require a lot of storage and it doesn’t always perform the best.
In simple terms, a container is a package of code with all its necessary components. Like a cargo ship you can send this container to anyone who wishes to execute it and their computer is the ship.
The left is an example of a “ship” without the docker system. In order to fit the new bin or cargo, it was necessary to implement a system to hold/host it. In this case, it is the virtual machine. On the right, the docker system has a more compact system which and load any of these bins onto the system directly to the operating system (OS). Some linux software have something similar in place but with the dockers software, this is simplified and can be utilized on some of the most popular operating systems. Over the years docker as also expanded to the cloud.
Why has docker become so popular today?
- Light weight: While virtual machines can do the same thing the docker software can do, there are some clear benefits that come with it. One of the biggest issues I mentioned earlier is that virtual machines take up a lot of resources. Some containers use up to gigabytes while the largest of docker files are only in megabytes. This means that it makes better use of the hardware capacity and shorter boot-up times.
- Resource efficiency: the docker engine and system uses far less resources on the computer compared to that of a virtual machine.
- Improved developer productivity: This feature is built upon the other two. With a lighter program to run and execute, in return it is it is easier to to build and improve upon.
- Seamless portability: Dockers is not limited to hardware and can be loaded across any desktop, data center, and cloud environment.
- Advanced features: There are many advanced features and tools built into the docker software. More info can be found here.
While dockers is a powerful tool, there are limitations that come with it. One of the major issues is that the containers do not run at bare-metal speeds. In simple terms this means that the docker system is not the fastest tools around to load bins. With it being more light weight than a virtual machine, the architecture of this software also has its limitations.
There is no seamless way to backup a container. When a container is shut down, all the data within is lost.
Containers sounds like a powerful tool and dockers is not the only one in the market capable of working with them. The most direct competitor to docker is kubernetes. Differences between the two can be found here.