kali中安装docker
时间: 2023-11-01 22:56:59 浏览: 208
在Kali Linux中安装Docker可以通过以下步骤完成:
1. 更新apt软件包列表:
```
sudo apt update
```
2. 安装Docker的依赖软件包:
```
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
```
3. 添加Docker官方的GPG密钥:
```
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
```
4. 添加Docker官方的APT软件包源:
```
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
```
5. 更新apt软件包列表:
```
sudo apt update
```
6. 安装Docker CE:
```
sudo apt install docker-ce
```
7. 启动Docker服务:
```
sudo systemctl start docker
```
8. 验证Docker是否安装成功:
```
sudo docker run hello-world
```
如果输出类似以下信息,说明Docker已经安装成功:
```
Hello from Docker!
This message shows that your installation appears to be working correctly.
```
阅读全文