cisco ioxclient docker package command error: An address incompatible with the requested protocol was used

cisco ioxclient docker package command error: An address incompatible with the requested protocol was used

我试图按照教程 here 从 docker 图像创建 Cisco IoX 包。

当我 运行 命令 ioxclient docker package -a leonardab/iox-test:latest . 时,出现以下错误:

Could not retrieve requested Docker image.
Error occurred :  dial unix /var/run/docker.sock: socket: An address incompatible with the requested protocol was used.

OS:Windows 10 专业版,Docker:18.09.0

问题出在 IoX 用于访问 docker 守护程序的协议中。 默认协议是unix,所以在默认设置下,IoX访问unix /var/run/docker.sock

要将其更改为 windows 协议,change the setting 通过 运行 执行以下命令:

ioxclient docker init

然后在出现提示时,按照说明填写 windows URL in this article

Enter the URI for the Docker daemon to use[unix:///var/run/docker.sock]: npipe:////./pipe/docker_engine

对于 API,将 docker API 运行ning 的版本放到你的机器上(要找到它,打开另一个 shell和 运行 docker version,您将看到 API 版本。请参阅 documentation)

Enter the API version that the target daemon is running[v1.22]: 1.39

(将 1.39 替换为您自己的 API 版本。)

ioxclient package 命令现在应该可以工作了。