怎么在kali Linux里安装docker
时间: 2023-12-03 20:57:46 浏览: 81
Linux 离线安装docker的过程(一键式安装)
1. 安装依赖包
```
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
```
2. 添加Docker官方GPG密钥
```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
```
3. 添加Docker官方APT仓库
```
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
```
4. 更新APT包列表
```
sudo apt-get update
```
5. 安装Docker
```
sudo apt-get install docker-ce docker-ce-cli containerd.io
```
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.
```
阅读全文