首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在kali-linux中安装docker?

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

Unix & Linux用户
提问于 2021-01-23 23:12:39
回答 2查看 9.2K关注 0票数 2

我最近尝试过安装Docker,但自从安装以来,我就不能再更新kali-linux了。

这是我输入"sudo apt更新“之后的输出。

代码语言:javascript
复制
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.

有什么建议吗?谢谢!

EN

回答 2

Unix & Linux用户

发布于 2021-01-23 23:27:30

在源代码中使用debian代码:

按以下方式编辑/etc/apt/sources.list

代码语言:javascript
复制
deb [arch=amd64] https://download.docker.com/linux/debian buster stable

或使用以下命令:

代码语言:javascript
复制
printf "%s\n" "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" |\
sudo tee /etc/apt/sources.list.d/docker-ce.list

添加gpg键:

代码语言:javascript
复制
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

安装docker-ce

代码语言:javascript
复制
sudo apt update
sudo apt install docker-ce

在Debian上安装码头引擎

更新

我已经更新了Kali Linux文档,现在您可以安全地添加这个答案中描述的。下面是如何安装它:

在Kali Linux docker-ce上安装Docker可以使用Debian buster代码从Docker存储库安装。将Docker存储库添加到sources.list中

代码语言:javascript
复制
printf "%s\n" "deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable" |\
sudo tee /etc/apt/sources.list.d/docker-ce.list

导入gpg键:

代码语言:javascript
复制
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

指纹检查:

代码语言:javascript
复制
sudo apt-key fingerprint 0EBFCD88

安装最新版本的docker-ce:

代码语言:javascript
复制
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

参考文献

在Debian上安装码头引擎

票数 7
EN

Unix & Linux用户

发布于 2023-04-13 01:45:40

官方的Kali Linux码头指南指出:

需要记住的一点是,Kali Linux是基于Debian的,因此我们需要使用Debian当前的稳定版本(尽管Kali Linux是一个滚动发行版)。在撰写本报告时(2021年12月),它的“斗牛眼”

如您所见,Debian的稳定版本(截至2023年4月)是bullseye,而不是kali-rolling。当您访问这个URL https://download.docker.com/linux/debian/dists/时,您甚至不会在其中看到任何kali-rolling

因此,如果要删除错误,应打开以下文件:

  • /etc/apt/sources.list.d/docker.list
  • /etc/apt/sources.list.d/docker-ce.list

并将所有出现的kali-rolling替换为bullseye

例如,在我的例子中,我有:

  • /etc/apt/sources.list.d/docker.list
代码语言:javascript
复制
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] 
https://download.docker.com/linux/debian bullseye stable
  • /etc/apt/sources.list.d/docker-ce.list
代码语言:javascript
复制
deb https://download.docker.com/linux/debian bullseye stable
票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/630643

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档