如何在kali-linux中安装docker-ce?

n0n*_*ame 3 linux upgrade kali-linux docker

我最近尝试安装 Docker,但自从安装后我就无法再更新 kali-linux 了。

这是我输入“sudo apt update”后的输出

Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:2 https://download.docker.com/linux/debian kali-rolling InRelease
Err:4 https://download.docker.com/linux/debian kali-rolling Release
  404  Not Found [IP: 13.227.73.95 443]
Hit:3 http://mirrors.ocf.berkeley.edu/kali kali-rolling InRelease
Reading package lists... Done              
E: The repository 'https://download.docker.com/linux/debian kali-rolling Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Run Code Online (Sandbox Code Playgroud)

有什么建议么?谢谢!

GAD*_*D3R 8

在您的来源中使用debian代号:

编辑你的/etc/apt/sources.list如下:

deb [arch=amd64] https://download.docker.com/linux/debian buster stable
Run Code Online (Sandbox Code Playgroud)

或使用以下命令:

printf "%s\n" "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" |\
sudo tee /etc/apt/sources.list.d/docker-ce.list
Run Code Online (Sandbox Code Playgroud)

添加 gpg 密钥:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Run Code Online (Sandbox Code Playgroud)

安装docker-ce

sudo apt update
sudo apt install docker-ce
Run Code Online (Sandbox Code Playgroud)

在 Debian 上安装 Docker 引擎

更新

我已经更新了Kali Linux 文档,现在您可以安全地添加 Debian docker-ce 存储库,如本答案中所述。安装方法如下:

在 Kali Linux 上安装 docker-ce

docker-ce 可以使用 Debian buster 代号从 Docker 存储库安装。

将 Docker 存储库添加到您的sources.list

printf "%s\n" "deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable" |\
sudo tee /etc/apt/sources.list.d/docker-ce.list
Run Code Online (Sandbox Code Playgroud)

导入 gpg 密钥:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Run Code Online (Sandbox Code Playgroud)

指纹检查:

sudo apt-key fingerprint 0EBFCD88
Run Code Online (Sandbox Code Playgroud)

安装最新版本的 docker-ce:

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
Run Code Online (Sandbox Code Playgroud)

参考

在 Debian 上安装 Docker 引擎