Skip to content
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

Add ssh protocol support. #102

Merged
merged 3 commits into from
Sep 16, 2019
Merged

Add ssh protocol support. #102

merged 3 commits into from
Sep 16, 2019

Conversation

x13machine
Copy link
Contributor

@x13machine x13machine commented Apr 25, 2019

Currently, I have so it creates a new ssh connection on every request. Do you think the ssh connection should persist? So you think it should be an option?

Example:

var Docker = require("dockerode");
var fs = require('fs');
var key = fs.readFileSync('/path/to/ssh-key');

var docker = new Docker({
    protocol: 'ssh',
    host: 'localhost',
    ssh: {
        privateKey: key,
        username: 'root'
    }
});

docker.listImages((e,d) => {
    console.log('img', e, d);
});

docker.info((e,d) => {
    console.log('con', e, d);
});

fixes #99

@x13machine x13machine changed the title SSH protocol added Add ssh protocol support. Apr 25, 2019
@apocas
Copy link
Owner

apocas commented Jun 19, 2019

I think it's better for it to be an option.
If someone wants persistent connections it will be able to specify it.

Awesome and much needed PR :)

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.

request: add the native docker SSH support now available in v18.09
2 participants