Docker container-installation and deployment

First of all, we need to understand what is Docker?
Docker is a package of Linux containers, providing a simple and easy-to-use container interface. And the container technology is not the technology of the Docker company, but the technology of the Linux kernel.
The core function of the current bare-handed container technology is to create a "boundary" for it by restricting and modifying the dynamic performance of the process.
Before installing Docker, we stop the firewall and selinux as we did before installing other services to facilitate subsequent operations .
1. Docker installation:
1. Download the Docker warehouse:
wget https://download.docker.com/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
Docker container-installation and deployment

2. Install Docker engine:
yum install -y docker-ce docker-ce-cli containerd.io

3.启动Docker:
systemctl start docker && systemctl enable docker

4. Verify that Docker Engine
Docker container-installation and deployment
is installed correctly by running the hello-world image. Here hello-world is the image. After we execute the commands in the figure, Docker will take the initiative to download the image and start a container with this image; When the container is running, it prints Hello from Docker! and exits.
2. Start a container:
1. Use Alibaba Cloud's image source to speed up the image download speed.
Register an Alibaba Cloud account and log in. After entering the Alibaba Cloud page, click on the console
Docker container-installation and deployment
and then click on the container mirroring service-mirror tool-mirror accelerator
Docker container-installation and deployment
to complete according to the prompts Configuration
Docker container-installation and deployment

2. Run the container
Docker container-installation and deployment

Guess you like

Origin blog.51cto.com/14881361/2678186