kali系统安装docker
时间: 2023-11-03 12:05:09 浏览: 128
在Kali系统上安装Docker的步骤如下:
1. 添加Docker官方的GPG密钥:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
2. 更新源:
echo 'deb https://download.docker.com/linux/debian stretch stable' > /etc/apt/sources.list.d/docker.list
3. 导入证书:
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
4. 系统更新:
sudo apt-get update
5. 安装Docker:
sudo apt install docker.io
6. 检查Docker安装是否成功:
docker -v
7. 添加加速器(可选):
编辑 /etc/docker/daemon.json 文件,内容如下:
{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}
重启服务生效:
sudo systemctl daemon-reload
sudo systemctl restart docker
8. 安装Docker Compose:
sudo apt install docker-compose
阅读全文