fabric8io / docker-maven-plugin

Maven plugin for running and creating Docker images
https://dmp.fabric8.io
Apache License 2.0
1.88k stars 643 forks source link

Remote DOCKER_HOST configuration does not support ssh protocol #1411

Open vivekweb2013 opened 3 years ago

vivekweb2013 commented 3 years ago

Description

When setting the remote docker host over ssh using DOCKER_HOST environment variable like below export DOCKER_HOST="ssh://user@remotehost"

The plugin fails with below error

ClientProtocolException: ssh protocol is not supported

Why SSH?

I can open the tcp port for remote docker daemon but doing that involves additional configurations at firewall and service side, also setting ssl authentication is an additional overhead, since I've set the ssh passwordless authentication already it would be great if the plugin supports connection over ssh

How to reproduce

Software:

stacktrace

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.34.1:build (default-cli) on project command-builder: Cannot create docker access object : ClientProtocolException: ssh protocol is not supported ->
dezren39 commented 3 years ago

Is there any way for this to be enabled? Since docker has added support this has been used more and more. It might just be that the schema needs to be updated to include ssh, and docker can take it from there.

mlhartme commented 3 years ago

I second dezren39 -- ssh support would be very welcome!

wujimin commented 2 years ago

need this feature too

rhuss commented 1 year ago

Indeed, dmp only support TCP, via remote or UNIX sockets. I agree that this would be a great addition to dmp but we don't have the bandwidth to add any bigger features to dmp. However, I you feel fancy we are happy about any contributions. I think the connection abstraction with dmp is quite nice, so it should not be impossible (but still quite some work).

Also, before you want to start on this, let me know so that we can align on any ssh dependency that might be needed to include.