kali安装docker
时间: 2023-10-04 18:11:44 浏览: 26
以下是在 Kali Linux 上安装 Docker 的步骤:
1. 更新 Kali Linux 系统:
```
sudo apt update && sudo apt upgrade
```
2. 安装 Docker 的依赖:
```
sudo apt-get install apt-transport-https ca-certificates gnupg-agent software-properties-common -y
```
3. 添加 Docker GPG 密钥:
```
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
```
4. 添加 Docker 软件源:
```
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
```
5. 更新软件源并安装 Docker:
```
sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io -y
```
6. 启动 Docker 服务:
```
sudo systemctl start docker
```
7. 验证 Docker 是否安装成功:
```
sudo docker run hello-world
```
如果输出以下内容,说明 Docker 已经成功安装并运行:
```
Hello from Docker!
This message shows that your installation appears to be working correctly.
...
```
阅读全文