Interface: IDockerConnectionOptions
The connection options of the Docker component, as buildDockerConnectionOptions takes them: a socket (socketPath), or a host and port reached over HTTP, HTTPS or SSH. Without socketPath nor host, the component connects to the Docker of the environment (DOCKER_HOST, else the local socket), with the other options given (timeout, headers, version…) applied over the environment's.
Properties
ca?
optionalca?:string|string[] |Buffer<ArrayBufferLike> |Buffer<ArrayBufferLike>[]
The certificates of the authorities trusted for the daemon's HTTPS certificate: their PEM contents, not their file paths.
Default
undefined (the authorities of Node.js)cert?
optionalcert?:string|string[] |Buffer<ArrayBufferLike> |Buffer<ArrayBufferLike>[]
The client certificate of the HTTPS connections (its PEM contents).
Default
undefinedheaders?
optionalheaders?:object
The HTTP headers added to every request sent to the daemon.
Index Signature
[name: string]: string
Default
undefinedhost?
optionalhost?:string
The host name or IP address of the daemon, reached with protocol.
Default
undefined (the Docker of the environment)key?
optionalkey?:string|string[] |Buffer<ArrayBufferLike> |Buffer<ArrayBufferLike>[] |IDockerKeyObject[]
The private key of cert (its PEM contents), or keys with their passphrases.
Default
undefinedport?
optionalport?:string|number
The port of the daemon on host: by convention 2375 over HTTP and 2376 over HTTPS; the SSH port for 'ssh'.
Default
undefined (80 over HTTP, 443 over HTTPS, 22 over SSH)protocol?
optionalprotocol?:"https"|"http"|"ssh"
How host is reached: 'http', 'https', or 'ssh' (which needs the optional package ssh2, and the Docker CLI on the remote host). Ignored with socketPath.
Default
'https' when ca, cert and key are all given, 'http' otherwise
socketPath?
optionalsocketPath?:string
The path of the daemon's Unix socket (/var/run/docker.sock), or of its named pipe on Windows (//./pipe/docker_engine). When set, host and port are ignored.
Default
undefined (the Docker of the environment)sshAuthAgent?
optionalsshAuthAgent?:string
The path of the SSH agent's socket, which authenticates the SSH connections.
Default
undefined (the SSH_AUTH_SOCK environment variable)
timeout?
optionaltimeout?:number
How long a request may stay idle (no data received), in milliseconds, before it fails; the streams (followed logs) included.
Default
undefined (no timeout)username?
optionalusername?:string
The user of the SSH connections.
Default
undefinedversion?
optionalversion?:string
The version of the Docker Engine API used by the requests ('1.47' or 'v1.47').
Default
undefined (negotiated with the daemon)