Home >Operation and Maintenance >Docker >Can docker run on a virtual machine?
#Docker containers can run on virtual machines or physical machines. Strictly speaking, containers and virtual machines are not on the same level. They are a packaged collection of software environments.
Whether it is a virtual machine or a physical machine, it is a delivery method of hardware/infrastructure, which is essentially a level; and containers mainly solve a series of software-centered problems (development, testing, Deploy, publish, run).
Running containers in virtual machines has become a common practice. For example, AWS's container service only runs in virtual machines.
The Docker daemon can communicate directly with the main operating system to allocate resources to each Docker container; it can also isolate the container from the main operating system and isolate each container from each other. Docker is often used to isolate different applications, such as front-end, back-end, and database.
Virtual machines are better at completely isolating the entire operating environment. For example, cloud service providers usually use virtual machine technology to isolate different users. A virtual machine takes minutes to start, while a Docker container can start in milliseconds. Without a bloated operating system, Docker can save a lot of disk space and other system resources.
For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.
The above is the detailed content of Can docker run on a virtual machine?. For more information, please follow other related articles on the PHP Chinese website!