1、卸载可能存在的或者为安装成功的Docker版本
`sudo apt-``get` `remove docker docker-engine docker-ce docker.io`
2、添加阿里云的GPG密钥
`curl -fsSL http:``
3、添加以下命令
sudo apt-get install software-properties-common
更新
sudo apt-get update
4、使用以下命令设置存储库
`sudo add-apt-repository ``"deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"`
5、安装最新版本的Docker(飞速安装)
`sudo apt-``get` `update`
`sudo apt-``get` `install docker-ce docker-ce-cli containerd.io docker-compose-plugin`
6、验证Docker是否安装成功
docker version
出现以下结果则安装成功

7、检查docker是否处于运行状态
systemctl status docker
以下结果为未运行

以下结果为已运行

8、运行以下命令启动docker服务
sudo systemctl start docker
9、设置docker服务在开机时自动运行
sudo systemctl enable docker
10、查看docker是否运行
systemctl status docker
11、验证docker是否运行正常
sudo docker run hello-world
出现以下结果为正常运行
