A
A
A person from Kazakhstan2016-05-19 20:18:12
Docker
A person from Kazakhstan, 2016-05-19 20:18:12

What is Docker for?

How is it used and why is it impossible to do without it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
viiy, 2016-05-20
@LenovoId

Imagine that there is no docker spoon .
1) There is one physical machine. You install software, various applications, databases, web servers, test users come in, start something. The first problem is that you do not understand who needs what, who is the owner of the files, attach them, why the demons hang and who is responsible for this. As a way out, you decide to divide it into virtual machines.
2) You have a physical machine + virtual machines on it. You allocate your own virtual machine for each task, individual users sit there, you put some order in place. A task appears - users want php 6, but it's not there, they want python3, but it's not there, they want Mongo, but it's an old version. You update repositories, download new packages, install, some users are happy, some are not - they need the old version as it was. Oops!
3) One physical machine + even more virtual machines. You have separated all users so that no one fights over software versions, if you need php6 - go to this machine, you need php5 - to this one. Everyone is happy, but there are developers who literally say this - "and everything works on my working machine, I transferred everything as it was to the virtual machine, and I get the error missing library libXXX.so.X". And you understand that all you have to do is create a complete copy of the developer's machine so that the software runs on this virtual machine without errors... And then Docker appears! :)
4) Docker solves exactly this problem. You do not need to care about the software that is installed on the server/virtual machine. You just take and transfer the software with all the "guts" to another server and it just works. It works due to the fact that all the "guts" are layers of the file system strung like beads on each other. Additionally, the problem of free space is solved, because the layers are repeatedly reused by containers, if you need php + one library, and another php + another library, you use (roughly speaking) the php layer, and for the additional library you make a separate layer, at the same time another person does there is another layer above php and you do not fight among yourself and do not see other people's libraries. This is rude and most likely for the sake of one library no one makes a new layer, they make the layer fatter.
Docker places all running processes in an isolated environment of processes, file system and network stack. There are many features of working with Docker, because it assumes that you run one process in one container. If you need to run a whole set of daemons, then there are problems, you need to write a shell script that will raise all this in a container. There are also features on the network, the file system. For some, Docker is a salvation and a solution to all problems, but as a system administrator, I am not enthusiastic about this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question