Skip to content

transport module supporting remote connections though ssh #1440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from

Conversation

mwiede
Copy link
Contributor

@mwiede mwiede commented Jul 21, 2020

As mentioned in #1130 I wrote a transport module, which supports connections through ssh.
For the ssh connection I used Jsch library, for the http client, I used OKhttp. I guess both libraries can be replaced with alternatives, but for now, I started like this.
I needed to extend the testing setup a little bit, so that any test for the new transport module only connects though ssh. So now, in the ci, there are two maven builds with conditionals, as well as in com.github.dockerjava.cmd.CmdIT.
There are several ways to connect to the docker daemon on the remote site, as I explained in https://github.com/mwiede/docker-java/blob/master/docker-java-transport-ssh/Readme.md
Feedback welcome!

@bsideup
Copy link
Member

bsideup commented Jul 21, 2020

@mwiede thanks for submitting the PR! I will review it soon, but meanwhile, could you please revert all non-relevant changes (like the imports reordering or indentation changes)? Thanks in advance!

@mwiede
Copy link
Contributor Author

mwiede commented Jul 21, 2020

@bsideup Alright, I removed the import ordering stuff.
I noticed, that the CI run now takes over one hour. I had added docker version 19.03. to the matrix, but this is already the default version, so I am going to remove it again.

@stale
Copy link

stale bot commented Aug 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@rob-valor
Copy link

@bsideup Did you manage to take a look at this pull request? Now, with the new Docker Desktop story, the landscape is somewhat changing making this feature more needed that ever 😉

@bsideup
Copy link
Member

bsideup commented Feb 14, 2022

Sorry, I am afraid the change is too involved to be considered added, as docker-java is a low level library, and SSH seems to be a "meta" transport. Will consider making it easy to provide custom SocketFactories to existing transports.

@rob-valor
Copy link

Maybe some more info and a possible fix for those facing the same issue.
We faced this issue when using Testcontainers and Podman. Now the non Linux users are switching to Rancher Desktop and that installation seems to set up the required components/configuration for Testcontainers and the docker-java client in order to work correctly.

@mwiede
Copy link
Contributor Author

mwiede commented Feb 15, 2022

@rob-valor I am trying to release the transport-module I created as an independent package. With #1818 this is now possible and users should be able to use this as described on getting_started. I will update this once I have it released

@bsideup
Copy link
Member

bsideup commented Feb 15, 2022

@rob-valor both Rancher Desktop and Podman work fine with docker-java (and Testcontainers) without the SSH transport.

Examples:
testcontainers/testcontainers-java#2088 (comment)
testcontainers/testcontainers-java#4791 (comment)

@mwiede
Copy link
Contributor Author

mwiede commented Feb 22, 2022

FYI I have released the code of this at https://github.com/mwiede/docker-java-transport-jsch

@cvgaviao
Copy link

cvgaviao commented May 25, 2024

@bsideup

@rob-valor both Rancher Desktop and Podman work fine with docker-java (and Testcontainers) without the SSH transport.

Examples: testcontainers/testcontainers-java#2088 (comment) testcontainers/testcontainers-java#4791 (comment)

Only if you are able to install them locally, that is not the case in my company, so we need to use a remote podman :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants