windows - 在适用于 Windows 的 Ubuntu 应用程序上安装 Docker

标签 windows docker ubuntu hyperledger-fabric

我正在尝试在 Windows 应用商店提供的 ubuntu 应用上安装 docker。

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

enter image description here

这适用于强制 ssl 命令

curl -4fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

但是在添加仓库的时候

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

它再次抛出无法解析主机的错误

enter image description here

请提出解决此 DNS 解析问题的解决方案。

最佳答案

首先检查你是否有docker,你可能会安装:

$docker --version

然后,删除旧版本

$sudo apt-get remove docker docker-engine docker.io containerd runc

尝试安装特定的 Docker 版本(显示可用链接):

$apt-cache madison docker-ce

选择特定版本:

$sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
$sudo apt-get update

检查是否安装成功:

$sudo docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.

关于windows - 在适用于 Windows 的 Ubuntu 应用程序上安装 Docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56351772/

相关文章:

java - 使用 DockerComposeContainer 从 compose 文件中仅启动一项服务

c++ - 在 Ubuntu 12.10 上使用 C++ 通过 TCP 聊天程序有问题

ubuntu - CoreOS 中的 docker ubuntu cron 不运行,有趣的行为

c - 使用 ShellExecuteEx 永久设置路径变量

windows - git lfs 使用指针文件处理存储库中的重复文件

c++ - 使用 WriteFile 将 RegQueryValueEx 值写入文件失败

azure - 尝试将 docker 推送到 Azure 容器注册表时出现 "unauthorized: authentication required"

linux - 从本地网络访问在 WSL(Linux 的 Windows 子系统)上运行的 Web 服务器

docker - Docker安装卷,用于编辑源代码

ubuntu - 终端日志文件