转自:https://www.cnblogs.com/tangzz/p/11950126.html
1.sudo apt-get remove docker.io docker-engine
2.sudo apt-get update
3.$ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common
4.# 官方源 $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - # 中科大源
$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add - # 清华源
$ curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
# 检查秘钥是否安装成功
$ sudo apt-key fingerprint 0EBFCD88
5.
Ubuntu18.04 安装Docker【转】
原文:https://www.cnblogs.com/summer1019/p/13385160.html