1, view the system version:
Docker need Linux Kernels greater than 3.10 and a 64-bit machine, with uname -a can check the compliance.
2 , execute the command
Edit Text: vim /etc/apt/sources.list.d/backports.list, add the following code:
deb http://http.debian.net/debian wheezy-backports main
Then refresh Source: apt-get update
if there docker installed, then delete the old version docker
apt-get purge lxc-docker*
apt-get purge docker.io*
apt-get update
3, confirmed apt added https method and CA cerificates
apt-get install apt-transport-https ca-certificates
4, add a new GPG key
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76
5, edit the file:
vim /etc/apt/sources.list.d/docker.list, because Kali2.0 is based on Debian Wheezy version, so the addition of the following codes:
deb https://apt.dockerproject.org/repo debian-wheezy main
#On Debian Jessie
#deb https://apt.dockerproject.org/repo debian-jessie main
#On Debian Stretch/Sid
#deb https://apt.dockerproject.org/repo debian-stretch main
Once saved, and then update: apt-get update
6, confirm the correct installation repository
apt-cache policy docker-engine
7, the formal installation:
apt-get update
apt-get install docker-engine # installation is complete, open the docker services
service docker start # verify the installation, run the test sample
docker run hello-world # If there are no errors on the great merit of the cause!
Reprinted: https://www.cnblogs.com/longronglang/p/8666612.html