直接用官方提供的https://get.docker.com/安装
curl -sSL https://get.docker.com/ | sh
如果提示没有curl的话,先安装curl
apt-get install curl
安装出错提示
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
docker-engine : Depends: init-system-helpers (>= 1.18~) but it is not installable
Recommends: aufs-tools but it is not going to be installed
Recommends: cgroupfs-mount but it is not installable or
cgroup-lite but it is not installable
Recommends: git but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
解决方法
wget http://launchpadlibrarian.net/173841617/init-system-helpers_1.18_all.deb
dpkg -i init-system-helpers_1.18_all.deb
再次执行上面官方的安装docker命令。成功。
docker version
Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:13:40 2017
OS/Arch: linux/amd64
发表回复