Kali安装Docker

Kali Linux install Docker


官方文档链接

Debian

Mac

Ubuntu


官方文档方法

环境要求:64位Linux系统,内核版本>=3.10(可通过uname -a查看)

1
2
[email protected]:~# uname -a
Linux Chyi 4.19.0-kali4-amd64 #1 SMP Debian 4.19.28-2kali1 (2019-03-18) x86_64 GNU/Linux

添加官方源

1
$ vim /etc/apt/sources.list
1
2
deb http://http.kali.org/ kali-rolling main non-free contrib 
deb-src http://http.kali.org/ kali-rolling main non-free contrib
1
$ sudo apt-get update

卸载旧版本

1
$ sudo apt-get remove docker docker-engine docker.io containerd runc

安装

1
2
3
4
5
6
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common

添加官方GPG key

1
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

成功返回OK

校验

搜索9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88中的后8位

1
2
3
4
5
6
$ sudo apt-key fingerprint 0EBFCD88

pub 4096R/0EBFCD88 2017-02-22
Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid Docker Release (CE deb) <[email protected]>
sub 4096R/F273FCD8 2017-02-22

安装Docker CE

1
$ echo 'deb https://download.docker.com/linux/debian stretch stable' > /etc/apt/sources.list.d/docker.list
1
$ sudo apt-get update
1
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

Hello World!

1
2
3
4
5
6
7
$ sudo docker run hello-world




Hello from Docker!
This message shows that your installation appears to be working correctly.