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

wants to merge 2 commits into
base: master


Copy link

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?


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);
});,d) => {
    console.log('con', e, d);

fixes #99

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


This comment has been minimized.

Copy link

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
None yet
2 participants
You can’t perform that action at this time.