What is Docker?
Hello! Well .. if you have fallen into this blog, surely it is because lately you’ve heard a lot about containers, microservices, etc … So, I’m going to try to tell you in a very simple and quick way that it’s all this Docker mess, with its images and which are a few things called containers that are changing both the DevOps world.
Warning, I’m not an expert at all, and the goal of this blog has always been and will be a way to strengthen my knowledge and learning, so if you see any Failure or something that you think could be done better or different, please send me an email and I’ll update it delighted.
Okay, now let’s start:
What’s behind the container and Docker technology?
The main idea is to create small systems (containers) that are lightweight and portable, that can be executed on any machine (yes, on any machine regardless of the OS you have installed) as long as you have Docker installed.
Wait … What is a container in Docker?
Imagine that it is a box, basically, you can put your application in there with all its dependencies, for example: Imagine that you have an application in Python that does wonders and has some dependencies, because imagine that you can put everything together and that magically works. Now, that application you want to share, if you do not use Docker, every time you share that code that you’ve worked so hard for someone to make it work, you must have the same versions of the dependencies or at least some that are compatible, right? ? Docker infinitely facilitates one of the basic pillars of computer engineering and software development known as “low coupling” or under coupling, that is, the code is as independent as possible from everything that surrounds it.
What are the advantages of Docker over Vagrant?
Basically, the use of resources is much more efficient Docker, why? In the image above, you can clearly see the difference, when we use docker, the Docker engine (what makes it work) is very close to the operating system, which translates into speed and efficiency in the use of resources. About Docker, our app would work, with all its dependencies and services (we will see later what they are).
With a virtual machine we need a Hypervisor and an application to work, in the case of Vagrant, it is also necessary to use VirtualBox or VMWare. Apart, on that, we must install an operating system that meets the requirements of our application and then all the dependencies so that our code works. It seems more complex, right?
If now, that same environment we want to pass it to production or to a partner, although it is not impossible, it is a bit more difficult than with Docker.