Who can give a brief introduction to what docker is used for?

  docker, question

After reading Baidu Encyclopedia for a while, I still didn’t really understand it because there were too many professional terms. Who can simply explain, for example, what problem does it solve?
I have just read the answers from several great gods. Perhaps I have had too little contact with them. The feeling is still not very clear. Is it equivalent to a virtual machine, to which virtual machine do you deploy the software? Isn’t the performance much worse? If it uses the resources of the host machine, then it is no different from running directly on the host machine. If the host machine lacks its dependency library, it still cannot run.

For example, you are usingUbuntuThe server usesCentOS, then at this time you have to deploy the project to the server, which may take a lot of time to configure the environment. Or, for example, what you useMySQLIn the past, every time you reinstall the system or change the environment, you have to reinstall your environment. The more things you have, the more time you spend.
And useDockerAll you need is an order, and you can use it in yourUbuntuRun a “new environment” in the world. of course, this environment is still based on your existing environment, that is to say, you actually share the same set of resources, but this environment already has what you need.
You needMySQL, then install a beltMySQL, and then start a container.
You needRedis, then install a beltRedis, and then start a container.
You need to … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then … then …
Of course, you can also modify the container on the basis of others, such as adding some of your own software or modifying the configuration file, and thencommitIn this way, you can make this container into a mirror image, and later you can use this mirror image to create n identical containers.
For example, you have to learn to pick upRedisCluster, then you can download oneRedisAfter the configuration of the cluster is set up, submit the container to generate a mirror image, and then run 6 or more containers according to the mirror image, thus forming a cluster.
AndDockerThe occupied resources are very small.