Microservice-based architecture has become a popular trend. Docker has injected greater vitality into the vigorous development of microservices.
The advantages of docker mainly come from two aspects: fast and portable.
1. Fast
Ordinary virtual machines need to start a complete operating system instance every time, while docker shares an operating system through kernel sharing.
This means that starting and stopping a docker container does not take minutes, just a few hundred milliseconds is enough.
2. Portability
In ordinary virtual machine solutions, if the application is to be deployed to different types of virtual machines, it needs to create image files for specific virtual machines, which adds a lot of additional development and testing workload, while the design concept of docker is to write once and run anywhere. As long as the docker container is still running, the application can be guaranteed to run normally.
Recommended related tutorials: docker tutorial
The above is the detailed content of What are the advantages of docker. For more information, please follow other related articles on the PHP Chinese website!