The difference between using docker deployment and direct deployment: 1. Using docker deployment and installation is fast and efficient; 2. Docker deployment takes up less resources, which is MB level, while direct installation of the server takes up GB level ; 3. Docker uninstallation and management are more convenient and clean, just delete the container and image directly.
The operating environment of this tutorial: linux7.3 system, docker version 19.03, Dell G3 computer.
The difference between direct installation of the operating system and docker installation
The difference between direct installation and docker installation
Let’s take the MySQL database software as an example to see the difference between installing MySQL directly and using docker to install MySQL:
docker installation is fast and efficient;
Docker has good isolation and can install countless mysql instances without interfering with each other, as long as the mapped host ports are different;
takes up less resources, MB level, while the server installation is GB Level;
The startup speed is seconds, while the server installation starts at the minute level;
The performance is close to native, but the server installation is lower;
Data backup and migration, docker is more convenient and powerful;
Uninstall management is more convenient and clean, just delete the container and image directly;
Stability, as long as there is no problem with the docker environment, mysql will be fine.
Expand knowledge
Docker is a tool widely accepted and used by mainstream IT companies to build, manage and protect their applications. . Containers such as Docker allow developers to isolate and run multiple applications on a single operating system, rather than dedicating a virtual machine to each application on the server. Using containers is more lightweight, allowing for lower costs, better use of resources, and higher performance. This article will use Flask to develop a simple Python web application and prepare it for "containerization". Then create a Docker image and deploy it to test and production environments. Note: Please make sure Docker is installed on the machine. If not, please refer to the official Docker installation tutorial. Introduction to Docker
Docker is a tool that enables developers to deliver their applications (along with libraries or other dependencies), ensuring that they can run with the correct configuration regardless of the deployment environment. This is achieved by isolating applications in separate containers, which although separated by containers, can share the operating system and other resources. Docker consists of two parts:
Docker Engine: Application packaging tool, used to package applications.
Docker Hub: Tools for managing container applications on the cloud.
Recommended learning: "docker video tutorial"
The above is the detailed content of What is the difference between deploying with docker and deploying directly?. For more information, please follow other related articles on the PHP Chinese website!