Why use docker?

Why use docker?

Docker was officially released to the public in 2013, but it functioned much earlier as one of dotCloud’s internal projects. Today, many people can not imagine working without this opensource platform for developers and administrators.

Docker is actually a set of very functional tools that allows you to run many different processes in so-called containers (we wrote more about this technology in the article ” it in 2017. What awaits us?”), that is, in isolated environments. This is an increasingly popular solution, which can often be found, for example, in the cloud.

Docker can successfully replace a virtual machine and solutions such as Xen or VMware. The convenience of its use is also due to the fact that the container allows you to run applications in a banal way, without any emulation of the hardware layer, without the operating system.

Closed container process

It is possible to run the application as described above, because Docker allows the application process itself to function. In this way, you can initiate the action of any number of processes in different containers, and each of them has a specially allocated memory area, its own private IP address and interface, and has its own disk area where the operating system image and all the libraries that are needed to run the application were previously installed. It is also important that each of these containers works completely independently, but we can also create network connections between them. Note, however, that Docker runs under GNU / Linux control, while windows or Mac users must use VirtualBox virtual machine manager (here it is best to use the Docker Toolbox version). Another solution is to use a virtual machine with Docker preinstalled. This is already offered by more and more cloud computing providers (e.g. Azure, Amazon AWS, etc.).

All this, of course, is great and looks great, but a skeptical programmer may ask: Where is the benefit for me? Docker is worth using for at least two important reasons.

Building a development environment

Docker makes it very easy to build a development environment. Of course you can handle it without Docker. Of course, you can use for this, for example, vagrant. But why? Coders who previously had to deal with building their own development environment before the docker era, know perfectly well what they are talking about. When they took part in many different projects, on one “poor” laptop they had to install various databases, additional services, etc. and even using Vagrant, they had to write different scripts themselves, installing all the necessary dependencies. This “poor” laptop did not always withstand it. To support all these environments, really strong equipment was needed.

When we use docker, this problem disappears, you can cope without virtualization. Software installation is also often unnecessary. All because you can find in the repository images of installed systems, databases, applications, etc. Even if something is missing, you can build your own image as needed. Such ready-made images contain already installed containers and services.

Application distribution

Docker is so clever that it allows you to use images not only to easily create a development environment. You can also use this tool to distribute applications. While in the case of installation on a server, the administrator or user of the application must cope with this process and all related aspects (for example, the software is installed differently in Java and differently in Python or Ruby), the use of Docker makes the whole thing easier.

A developer can easily prepare a distribution package. Just take an image of the container with the application that has been completed. It is no longer the administrator or user who performs the installation, but the developer. In contrast, the first ones get a container that is ready to run and do not have to wonder what technology it is, how to install it and whether they have the right knowledge for this.

Go to our cases Get a free quote