mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Fix issues with types of Dockerode options
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import * as Docker from 'dockerode';
|
||||
import * as fs from 'fs';
|
||||
|
||||
// Code samples from Dockerode 'Getting started'
|
||||
const docker = new Docker();
|
||||
@@ -10,18 +11,19 @@ const docker4 = new Docker({ host: '127.0.0.1', port: 3000 });
|
||||
const docker5 = new Docker({
|
||||
host: '192.168.1.10',
|
||||
port: process.env.DOCKER_PORT || 2375,
|
||||
ca: 'ca',
|
||||
cert: 'cert',
|
||||
key: 'key'
|
||||
ca: fs.readFileSync('ca.pem'),
|
||||
cert: fs.readFileSync('cert.pem'),
|
||||
key: fs.readFileSync('key.pem'),
|
||||
version: 'v1.25' // required when Docker >= v1.13, https://docs.docker.com/engine/api/version-history/
|
||||
});
|
||||
|
||||
const docker6 = new Docker({
|
||||
protocol: 'https', // you can enforce a protocol
|
||||
host: '192.168.1.10',
|
||||
port: process.env.DOCKER_PORT || 2375,
|
||||
ca: 'ca',
|
||||
cert: 'cert',
|
||||
key: 'key'
|
||||
ca: fs.readFileSync('ca.pem'),
|
||||
cert: fs.readFileSync('cert.pem'),
|
||||
key: fs.readFileSync('key.pem')
|
||||
});
|
||||
|
||||
const docker7 = new Docker({
|
||||
|
||||
Reference in New Issue
Block a user