(1)更新Ubuntu的apt源索引
$ sudo apt-get update
(2)安装包允许apt通过HTTPS使用仓库
$ sudo dpkg --configure -a
$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
(3)添加Docker官方GPG key
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
(4)设置Docker稳定版仓库
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
(5)更新apt源索引
$ sudo apt-get update
(6)安装最新版本Docker CE(社区版)
$ sudo apt-get install docker-ce
(7)查看安装Docker的版本
$ docker --version
(8)启动服务并查看信息
sudo service docker start
sudo service docker stop
sudo service docker restart
docker info