1

As we mentioned in the previous article, a container is a process running on a host, and multiple containers use the operating system kernel on the same host. Here takes the Ubuntu20.04 system as an example to introduce the installation process of the Docker container engine.

Install

  1. Installation dependencies.
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  1. Add software sources.
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  1. Install the latest version of Docker.
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
  1. Check service status
sudo systemctl status docker

Test Docker service

  1. Execute the following command to add the current user to the docker user group.
sudo usermod -aG docker $USER
  1. Log out and log in again.
  2. Execute the following command to run the sample container.
docker run hello-world

If the message Hello from Docker can be output, the installation is successful.

thematic catalog


陈哥聊测试
158 声望3.3k 粉丝

资深敏捷测试顾问,国内知名项目管理软件禅道团队成员。