Interface: Docker (original) (raw)
Since
0.2.0
cli
• Readonly
cli: DockerCommand
You can also directly execute the Docker binary.
Output:
For convenience, the command result object also has methods to easily parse it depending on output format. See ExecResult instead.
Streams the output as a result of the execution of a Docker command. It is useful when the output of the command is too long, or you need to get the output as a stream.
listContainers
▸ listContainers(options?
): Promise
<unknown
>
Get the list of running containers (same as docker ps
).
By default, this will not list stopped containers. You can use the option {"all": true}
to list all the running and stopped containers.
Parameters
Name | Type | Description |
---|---|---|
options? | any | (Optional). A JSON like { "all": true, "limit": 10, "size": true, "filters": JSON.stringify({ status: ["exited"] }), } For more information about the different properties see the Docker API endpoint documentation. |
Returns
Promise
<unknown
>
listImages
▸ listImages(options?
): Promise
<unknown
>
Get the list of local container images
Parameters
Name | Type | Description |
---|---|---|
options? | any | (Optional). A JSON like { "all": true, "filters": JSON.stringify({ dangling: ["true"] }), "digests": true * } For more information about the different properties see the Docker API endpoint documentation. |
Returns
Promise
<unknown
>