To get started with Docker Engine on Ubuntu, make sure you meet the prerequisites, then install Docker.
要开始在Ubuntu上使用Docker引擎,请确保满足先决条件,然后安装Docker。
Prerequisites
OS requirements
To install Docker Engine, you need the 64-bit version of one of these Ubuntu versions:
先决条件
操作系统要求
要安装Docker Engine,您需要这些Ubuntu版本之一的64位版本:
Ubuntu Groovy 20.10
Ubuntu Focal 20.04 (LTS)
Ubuntu Bionic 18.04 (LTS)
Ubuntu Xenial 16.04 (LTS)
Docker Engine is supported on x86_64 (or amd64), armhf, and arm64 architectures.
x86_64(或amd64)、armhf和arm64体系结构支持Docker引擎。
Uninstall old versions
Older versions of Docker were called docker, docker.io, or docker-engine. If these are installed, uninstall them:
卸载旧版本
Docker的旧版本叫做Docker,码头工人,或docker引擎。如果已安装,请卸载它们:
一、卸载旧版本
sudo apt-get remove docker docker-engine docker.io containerd runc
二、设置存储库
使用存储库安装
在新主机上首次安装Docker引擎之前,需要设置Docker存储库。之后,您可以从存储库安装和更新Docker。
设置存储库
更新apt程序包索引并安装程序包,以允许apt通过HTTPS使用存储库:
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common