Ubuntu20.0.0 install docker container

1. Introduction to Docker

  • Docker is an open source application container engine, based on the  Go language  and open source under the Apache2.0 protocol.
  • Docker allows developers to package their applications and dependencies into a lightweight, portable container, which can then be distributed to any popular Linux machine, and can also be virtualized.
  • The container completely uses the sandbox mechanism, and there will not be any interface between each other (similar to the iPhone app), and more importantly, the performance overhead of the container is extremely low.
  • Docker has been divided into CE (Community Edition: Community Edition) and EE (Enterprise Edition: Enterprise Edition) since version 17.03, we can use the Community Edition.

2. Install Docker on Ubuntu 20.0.0

Note: sudo is not required under the root user. Choose one of the official and Ali sources. It is recommended to use Ali source, which is fast.

1. Uninstall the previous version before installation, if it has been installed before

sudo apt-get remove docker docker-engine http://docker.io containerd runc

2. Update Ubuntu's apt source index

sudo apt-get update

3. Install the necessary system tools

sudo apt install apt-transport-https ca-certificates curl software-properties-common

 

4. Add the GPG key of the Docker repository to the system: (choose one of two)

1. Official GPG certificate
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

 2. Ali's GPG certificate

curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

5. Add the Docker repository to the APT source: (Choose one of two)

1. Official source

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

2. Aliyuan

sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

 6. Install Docker (Community Edition)

sudo apt-get install -y docker-ce

 I got this error when I installed, and then I shut down the virtual machine and restarted it back to normal

E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

 

7. Start Docker

sudo systemctl status docker

Supongo que te gusta

Origin blog.csdn.net/djklsajdklsajdlk/article/details/125140561
Recomendado
Clasificación