Docker --host results in `dial tcp i/o timeout`

if i try to get my remote image list i get a i/o timeout.
and this is the same for all other commands.

$ docker --host web1@my.domain.de image list
Get "http://my.domain.de:2375/_ping": dial tcp [xxxx:xxxx:101:272::1]:2375: i/o timeout

if i try the same command via ssh it just works:

$ ssh web1@my.domain.de docker image list
REPOSITORY                   TAG                              IMAGE ID       CREATED         SIZE
alpine                       latest                           1d34ffeaf190   2 months ago    7.79MB
phpmyadmin                   <none>                           87501b683e84   3 months ago    562MB
mariadb                      10.3                             1172e50de434   15 months ago   369MB

docker is running in rootlees mode on both my dev and the remote system.

currently on the server where docker is running there are only web and ssh ports open.
so would i need to open up this docker port so that the two can communicate?

or is there any other option to fix this?!

You can see port 2375 in the error message. That should reveal that you are not using a proper SSH connection string.

https://docs.docker.com/reference/cli/docker/#using-ssh-sockets

The ssh:// protocol is missing from the parameter.

1 Like

wow thanks!

hmpf i totally missed this partā€¦