[@types/dockerode]: add SSH options to DockerOptions interface (#43781)

* Update dockerode-tests.ts

* Update interface and fix test
This commit is contained in:
Brandon Waterloo [MSFT]
2020-04-10 20:22:50 -07:00
committed by GitHub
parent 5e8098e52f
commit 64968e5677
2 changed files with 11 additions and 1 deletions
+8
View File
@@ -47,6 +47,14 @@ const docker9 = new Docker({
Promise,
});
const docker10 = new Docker({
protocol: 'ssh', // SSH support is possible
host: '192.168.1.10',
port: 22,
username: 'test',
sshAuthAgent: '/tmp/ssh-abcde/agent.12345',
});
async function foo() {
const containers = await docker7.listContainers();
for (const container of containers) {
+3 -1
View File
@@ -932,12 +932,14 @@ declare namespace Dockerode {
socketPath?: string;
host?: string;
port?: number | string;
username?: string;
ca?: string | string[] | Buffer | Buffer[];
cert?: string | string[] | Buffer | Buffer[];
key?: string | string[] | Buffer | Buffer[] | KeyObject[];
protocol?: 'https' | 'http';
protocol?: 'https' | 'http' | 'ssh';
timeout?: number;
version?: string;
sshAuthAgent?: string;
Promise?: typeof Promise;
}