docker-maven-plugin icon indicating copy to clipboard operation
docker-maven-plugin copied to clipboard

Remote DOCKER_HOST configuration does not support ssh protocol

Open vivekweb2013 opened this issue 4 years ago • 4 comments

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

  • Set DOCKER_HOST environment variable with ssh connection details, like export DOCKER_HOST="ssh://user@remotehost"
  • Run the maven build

Software:

  • docker version: 19.03.13
  • docker-maven-plugin version: 0.34.1
  • maven version: 3.6.3

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 ->

vivekweb2013 avatar Dec 02 '20 11:12 vivekweb2013

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.

dezren39 avatar Oct 20 '21 22:10 dezren39

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

mlhartme avatar Nov 02 '21 15:11 mlhartme

need this feature too

wujimin avatar Sep 06 '22 16:09 wujimin

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.

rhuss avatar Feb 14 '23 11:02 rhuss