问题
I was trying to create a Cisco IoX package from a docker image following the tutorial here.
when I ran the command ioxclient docker package -a leonardab/iox-test:latest .
, I got the following error:
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 Pro, Docker: 18.09.0
回答1:
The problem is in the protocol used by IoX to access the docker daemon.
The default protocol is unix, so in the default setting, IoX access unix /var/run/docker.sock
To change it into windows protocol, change the setting by running the following command:
ioxclient docker init
then when prompted, fill in the windows URL as explained in this article
Enter the URI for the Docker daemon to use[unix:///var/run/docker.sock]: npipe:////./pipe/docker_engine
For the API, put the version of the docker API running on your machine (to find this out, open another shell and run docker version
, you 'll see the API version. see documentation)
Enter the API version that the target daemon is running[v1.22]: 1.39
(replace 1.39 with your own API version. )
The ioxclient package
command should work now.
来源:https://stackoverflow.com/questions/53586535/cisco-ioxclient-docker-package-command-error-an-address-incompatible-with-the-r