Test and development of the system-Docker container installation
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
- 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 -
- Add software sources.
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- Install the latest version of Docker.
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
- Check service status
sudo systemctl status docker
Test Docker service
- Execute the following command to add the current user to the docker user group.
sudo usermod -aG docker $USER
- Log out and log in again.
- 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
阅读 1.1k
0 条评论
得票最新