根据Docker 官网介绍的方法在Ubuntus上安装了Docker Engine,更多内容参考: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository
步骤
1. 更新apt 包列表
$ sudo apt-get update
2. 执行下面命令,使apt可以使用Https 传输Docker Repo
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
3. 添加Docker 官方公钥,如果没安装Curl,使用sudo apt-get install curl 去安装
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4. 配置apt 使用docker repository 的分支
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
5. 安装
$ sudo apt-get install docker-ce
6. 验证,执行下面命令验证Docker是否安装成功
$ sudo docker run hello-world