第一步:
sudo apt-get install apt-transport-https ca-certificates
第二步:添加GPG key
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
第三步:添加apt搜索
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
Precise 12.04 (LTS) |
deb https://apt.dockerproject.org/repo ubuntu-precise main |
Trusty 14.04 (LTS) |
deb https://apt.dockerproject.org/repo ubuntu-trusty main |
Xenial 16.04 (LTS) |
deb https://apt.dockerproject.org/repo ubuntu-xenial main |
sudo apt-get update
安装
sudo apt-get install docker-engine