@zuke/docker

← API reference

`@zuke/docker` — typed `DockerTasks` wrappers for the `docker` CLI.

Symbols

#

DockerBuildSettings

class
class DockerBuildSettings extends DockerSettings

Settings for docker build.

MemberSignatureDoc
tag tag(reference: string): this Add an image tag (-t); repeatable.
file file(path: PathLike): this Use an explicit Dockerfile (-f).
target target(stage: string): this Build a specific stage (--target).
platform platform(value: string): this Set the target platform(s) (--platform).
buildArg buildArg(key: string, value: string): this Pass a build-time variable (--build-arg KEY=value); repeatable.
noCache noCache(): this Do not use the layer cache (--no-cache).
pull pull(): this Always attempt to pull newer base images (--pull).
push push(): this Push the result to the registry after building (--push).
context context(path: PathLike): this The build context path or URL (default .).
#

DockerCommitSettings

class
class DockerCommitSettings extends DockerSettings

Settings for docker commit.

MemberSignatureDoc
container container(name: string): this The container to snapshot (required).
reference reference(name: string): this The image name to give the snapshot (positional).
message message(text: string): this A commit message (-m/--message).
author author(value: string): this The author to record (-a/--author).
change change(...instructions: string[]): this Apply a Dockerfile instruction to the result (-c/--change); repeatable.
noPause noPause(): this Leave the container running while it is committed (--pause=false). docker pauses it by default, which is what makes the snapshot consistent.
#

DockerContainerEntry

interface
interface DockerContainerEntry

One container of docker ps --format '{{json .}}'.

MemberSignatureDoc
id? id?: string The container id, as docker abbreviates it in a listing.
image? image?: string The image it was created from.
names? names?: string Its names, comma-separated as docker reports them.
command? command?: string The command it runs.
status? status?: string A human description of its state, e.g. Up 3 minutes.
state? state?: string The bare state, e.g. running or exited.
ports? ports?: string The published ports, as docker formats them.
#

DockerContainerListSettings

class
class DockerContainerListSettings extends DockerSettings

Base for the commands that act on one or more existing containers. The empty-list check is here so every one of them reports the same thing rather than letting docker print its usage.

MemberSignatureDoc
containers containers(...names: string[]): this Container names or ids to act on (required); repeatable.
#

DockerContainerSettings

class
class DockerContainerSettings extends DockerProcessSettings

Base for run and create, which configure a *new* container identically — docker's own run is create followed by start.

MemberSignatureDoc
image image(reference: string): this The image to run (required).
name name(value: string): this Name the container (--name).
rm rm(): this Remove the container when it exits (--rm).
detach detach(): this Run in the background (-d).
publish publish(host: string | number, container: string | number): this Publish a container port to the host (-p); repeatable.
volume volume(source: PathLike, target: PathLike): this Mount a host path into the container (-v); repeatable.
network network(value: string): this Attach the container to a network (--network).
entrypoint entrypoint(command: string): this Override the image's entrypoint (--entrypoint).
platform platform(value: string): this Run the image for a specific platform (--platform).
pull pull(policy: always | missing | never): this When to pull the image (--pull=<always|missing|never>).
restart restart(policy: string): this The restart policy (--restart), e.g. unless-stopped.
label label(key: string, value: string): this Attach metadata to the container (--label); repeatable.
#

DockerContextSettings

class
class DockerContextSettings extends DockerSettings

Settings for docker context. Pick the subcommand with create, ls, use, inspect, remove, or show.

MemberSignatureDoc
create create(name: string): this Create a context (context create <name>).
ls ls(): this List contexts (context ls), the default.
use use(name: string): this Make a context the default for later commands (context use <name>).
inspect inspect(...names: string[]): this Describe contexts (context inspect [<name>...]).
remove remove(...names: string[]): this Remove contexts (context rm <name>...).
show show(): this Print the context in use (context show).
dockerHost dockerHost(address: string): this The daemon a created context points at (--docker host=<address>).
description description(text: string): this A human description for a created context (--description).
from from(name: string): this Copy an existing context (--from <name>).
format format(template: string): this Render each context through a Go template (--format).
quietOutput quietOutput(): this Only print context names (-q/--quiet).
force force(): this Remove even the context in use (-f/--force).
#

DockerCpSettings

class
class DockerCpSettings extends DockerSettings

Settings for docker cp. Either end may be a container path (<container>:<path>) — which is what makes this the way a build gets an artifact out of a container that has already stopped.

MemberSignatureDoc
from from(path: PathLike): this The source, <container>:<path> or a host path (required).
to to(path: PathLike): this The destination, <container>:<path> or a host path (required).
archive archive(): this Keep uid/gid rather than mapping to the current user (-a/--archive).
followLink followLink(): this Follow a symlink in the source (-L/--follow-link).
#

DockerCreateSettings

class
class DockerCreateSettings extends DockerContainerSettings

Settings for docker create.

#

DockerDiffSettings

class
class DockerDiffSettings extends DockerSettings

Settings for docker diff.

MemberSignatureDoc
container container(name: string): this The container whose filesystem changes to show (required).
#

DockerExecSettings

class
class DockerExecSettings extends DockerProcessSettings

Settings for docker exec.

MemberSignatureDoc
container container(name: string): this The container to run the command in (required).
detach detach(): this Run the command in the background (-d).
privileged privileged(): this Give the command extended privileges (--privileged).
#

DockerExportSettings

class
class DockerExportSettings extends DockerSettings

Settings for docker export.

MemberSignatureDoc
container container(name: string): this The container whose filesystem to export (required).
output output(path: PathLike): this Write to a file rather than stdout (-o/--output).
#

DockerHistorySettings

class
class DockerHistorySettings extends DockerSettings

Settings for docker history.

MemberSignatureDoc
image image(reference: string): this The image whose layers to show (required).
noTrunc noTrunc(): this Print the full commands rather than eliding them (--no-trunc).
quietOutput quietOutput(): this Only show layer ids (-q/--quiet).
format format(template: string): this Render each layer through a Go template (--format).
#

DockerImageEntry

interface
interface DockerImageEntry

One image of docker images --format '{{json .}}'.

MemberSignatureDoc
id? id?: string The image id, as docker abbreviates it in a listing.
repository? repository?: string The repository, or <none> for an untagged image.
tag? tag?: string The tag, or <none> when the image carries none.
createdSince? createdSince?: string How docker describes the image's age, e.g. 2 days ago.
size? size?: string The on-disk size, as docker formats it.
digest? digest?: string The digest, when the listing was asked for one.
#

DockerImagePruneSettings

class
class DockerImagePruneSettings extends DockerSettings

Settings for docker image prune.

MemberSignatureDoc
all all(): this Remove every unused image, not only the dangling ones (--all). This is the difference between reclaiming a little space and reclaiming a lot.
force force(): this Do not prompt for confirmation (--force), which a build always needs.
filter filter(...expressions: string[]): this Limit what is pruned (--filter), e.g. until=24h; repeatable.
#

DockerImagesSettings

class
class DockerImagesSettings extends DockerSettings

Settings for docker images.

MemberSignatureDoc
all all(): this Show all images, including intermediate layers (-a).
quietOutput quietOutput(): this Only show image IDs (-q).
filter filter(expression: string): this Filter the listing (--filter); repeatable.
repository repository(name: string): this Restrict to a repository (positional argument).
format format(template: string): this Render each image through a Go template (--format), e.g. {{json .}} for one JSON object per line. "./docker.ts".DockerTasks.imageEntries pins that form.
digests digests(): this Also show each image's digest (--digests).
#

DockerImportSettings

class
class DockerImportSettings extends DockerSettings

Settings for docker import.

MemberSignatureDoc
source source(path: PathLike): this The tarball to import (required); - reads it from stdin, as docker's own import does.
reference reference(name: string): this The image name to give the result (positional).
message message(text: string): this A commit message for the imported image (-m/--message).
change change(...instructions: string[]): this Apply a Dockerfile instruction to the result (-c/--change); repeatable.
platform platform(value: string): this The platform to import for (--platform).
#

DockerInfoSettings

class
class DockerInfoSettings extends DockerSettings

Settings for docker info.

MemberSignatureDoc
format format(template: string): this Render through a Go template (--format), e.g. {{json .}}.
#

DockerInspectSettings

class
class DockerInspectSettings extends DockerSettings

Settings for docker inspect.

MemberSignatureDoc
targets targets(...names: string[]): this The objects to inspect — containers, images, volumes (required).
format format(template: string): this Render through a Go template (--format), e.g. {{.State.Status}} for one field, or {{json .}} for the whole record as JSON.
type type(kind: string): this Only look for this kind of object (--type), e.g. container.
size size(): this Include the disk usage of a container (-s/--size).
#

DockerKillSettings

class
class DockerKillSettings extends DockerContainerListSettings

Settings for docker kill.

MemberSignatureDoc
signal signal(name: string): this The signal to send (-s/--signal); docker defaults to SIGKILL.
#

DockerLoadSettings

class
class DockerLoadSettings extends DockerSettings

Settings for docker load.

MemberSignatureDoc
input input(path: PathLike): this Read from a tar archive instead of STDIN (-i).
quietOutput quietOutput(): this Suppress the load output (-q).
#

DockerLoginSettings

class
class DockerLoginSettings extends DockerSettings

Settings for docker login.

MemberSignatureDoc
username username(value: string): this The username (-u).
password password(value: string): this The password (-p), which docker accepts and which therefore stays on the wrapper. Prefer passwordStdin. This flag puts the password in the child's argv, and a child's argv is world-readable on a default Linux host — through ps or /proc/<pid>/cmdline — to every other user on the machine and every process the build starts. On a shared or self-hosted runner that is every co-tenant. The value is registered with the run's redactor, so Zuke's own renderings of the command mask it. That does not cover the process table: the argv handed to the operating system is not redacted, and docker itself warns about -p for the same reason. Masking is what can be done here, not a fix for the exposure.
passwordStdin passwordStdin(token: string): this Pipe the password to docker through STDIN (--password-stdin), which keeps it off the command line entirely. This is the route docker documents for exactly this reason, and the one to use in CI. The token goes to the child's standard input, which — unlike its argv — no other process on the host can read. The password is required, because the flag on its own means nothing: it tells docker to read standard input, and this wrapper is what has to put something there. A --password-stdin with no writer leaves docker reading a stream that is never written.
registry registry(server: string): this The registry server (defaults to Docker Hub).
#

DockerLogLevel

type
type DockerLogLevel = debug | info | warn | error | fatal

How verbose the docker client is (--log-level).

#

DockerLogoutSettings

class
class DockerLogoutSettings extends DockerSettings

Settings for docker logout.

MemberSignatureDoc
registry registry(server: string): this The registry to forget (positional); defaults to Docker Hub.
#

DockerLogsSettings

class
class DockerLogsSettings extends DockerSettings

Settings for docker logs.

MemberSignatureDoc
container container(name: string): this The container whose logs to read (required).
follow follow(): this Keep streaming (-f/--follow). A target that follows logs never returns on its own — pair it with .killAfter(...) from the tooling base, or with a container that exits.
tail tail(lines: number | all): this Show only the last N lines (--tail), or all.
since since(when: string): this Only logs since this timestamp or relative time (--since), e.g. 10m.
until until(when: string): this Only logs before this timestamp or relative time (--until).
timestamps timestamps(): this Prefix each line with its timestamp (-t/--timestamps).
details details(): this Include the extra attributes docker records (--details).
#

DockerNetworkSettings

class
class DockerNetworkSettings extends DockerSettings

Settings for docker network. Pick the subcommand with create, ls, remove, inspect, connect, disconnect, or prune.

MemberSignatureDoc
create create(name: string): this Create a network (network create <name>).
ls ls(): this List networks (network ls), the default.
remove remove(...names: string[]): this Remove networks (network rm <name>...).
inspect inspect(...names: string[]): this Describe networks (network inspect <name>...).
connect connect(network: string, container: string): this Attach a container to a network (network connect <net> <container>).
disconnect disconnect(network: string, container: string): this Detach a container (network disconnect <net> <container>).
prune prune(): this Remove the networks nothing uses (network prune).
driver driver(name: string): this The network driver (--driver), e.g. bridge.
subnet subnet(cidr: string): this The subnet in CIDR form (--subnet).
gateway gateway(address: string): this The gateway address (--gateway).
label label(key: string, value: string): this Attach metadata (--label); repeatable.
alias alias(name: string): this An extra name the container answers to on this network (--alias).
filter filter(...expressions: string[]): this Filter a listing or a prune (--filter); repeatable.
format format(template: string): this Render each network through a Go template (--format). "./docker.ts".DockerTasks.networkNames pins {{.Name}}.
quietOutput quietOutput(): this Only print network ids (-q/--quiet).
force force(): this Do not prompt for confirmation (--force).
#

DockerPauseSettings

class
class DockerPauseSettings extends DockerContainerListSettings

Settings for docker pause.

#

DockerPortSettings

class
class DockerPortSettings extends DockerSettings

Settings for docker port.

MemberSignatureDoc
container container(name: string): this The container whose port mappings to show (required).
port port(value: string | number): this A single private port to resolve, e.g. 8080/tcp.
#

DockerProcessSettings

class
class DockerProcessSettings extends DockerSettings

Base for the commands that run a process — run, create, and exec — carrying the flags all three accept.

MemberSignatureDoc
interactive interactive(): this Keep stdin open (-i).
tty tty(): this Allocate a pseudo-TTY (-t).
envVar envVar(key: string, value: string): this Set an environment variable (-e); repeatable.
envFile envFile(...paths: PathLike[]): this Read environment variables from a file (--env-file); repeatable.
workdir workdir(path: PathLike): this Set the working directory inside the container (-w).
user user(value: string): this Run as this user or uid:gid (-u/--user).
commandArgs commandArgs(...args: Array<string | number>): this The command and arguments to run inside the container.
#

DockerPsSettings

class
class DockerPsSettings extends DockerSettings

Settings for docker ps.

MemberSignatureDoc
all all(): this Show stopped containers too (-a).
quietOutput quietOutput(): this Only show container IDs (-q).
filter filter(expression: string): this Filter the listing (--filter); repeatable.
format format(template: string): this Render each container through a Go template (--format), e.g. {{json .}} for one JSON object per line. "./docker.ts".DockerTasks.psEntries pins that form.
latest latest(): this Show only the most recently created container (-l/--latest).
noTrunc noTrunc(): this Print ids and commands in full (--no-trunc).
size size(): this Include each container's disk usage (-s/--size).
#

DockerPullSettings

class
class DockerPullSettings extends DockerSettings

Settings for docker pull.

MemberSignatureDoc
image image(reference: string): this The image reference to pull (required).
platform platform(value: string): this Pull a specific platform (--platform).
quietOutput quietOutput(): this Suppress verbose output (-q).
#

DockerPushSettings

class
class DockerPushSettings extends DockerSettings

Settings for docker push.

MemberSignatureDoc
image image(reference: string): this The image reference to push (required).
allTags allTags(): this Push every tag of the repository (--all-tags).
#

DockerRenameSettings

class
class DockerRenameSettings extends DockerSettings

Settings for docker rename.

MemberSignatureDoc
container container(name: string): this The container to rename (required).
newName newName(name: string): this Its new name (required).
#

DockerRestartSettings

class
class DockerRestartSettings extends DockerContainerListSettings

Settings for docker restart.

MemberSignatureDoc
timeout timeout(seconds: number): this Seconds to wait before killing the container (-t/--time).
signal signal(name: string): this The signal to send first (-s/--signal).
#

DockerRmiSettings

class
class DockerRmiSettings extends DockerSettings

Settings for docker rmi.

MemberSignatureDoc
images images(...references: string[]): this The images to remove (at least one is required).
force force(): this Force removal (-f).
#

DockerRmSettings

class
class DockerRmSettings extends DockerContainerListSettings

Settings for docker rm.

MemberSignatureDoc
force force(): this Force removal of a running container (-f).
volumes volumes(): this Also remove anonymous volumes (-v).
#

DockerRunSettings

class
class DockerRunSettings extends DockerContainerSettings

Settings for docker run.

#

DockerSaveSettings

class
class DockerSaveSettings extends DockerSettings

Settings for docker save.

MemberSignatureDoc
images images(...references: string[]): this The images to save (at least one is required).
output output(path: PathLike): this Write to a file instead of STDOUT (-o).
#

DockerSearchSettings

class
class DockerSearchSettings extends DockerSettings

Settings for docker search.

MemberSignatureDoc
term term(value: string): this What to search Docker Hub for (required).
limit limit(count: number): this Cap the number of results (--limit).
filter filter(...expressions: string[]): this Filter the results (--filter), e.g. is-official=true; repeatable.
format format(template: string): this Render each result through a Go template (--format).
noTrunc noTrunc(): this Print descriptions in full (--no-trunc).
#

DockerSettings

class
class DockerSettings extends ToolSettings

Shared base for every docker subcommand: the binary and global options.

MemberSignatureDoc
dockerContext dockerContext(name: string): this Use a named docker context (--context), which is how a build talks to a remote daemon or a second local one without exporting DOCKER_HOST. Named dockerContext rather than context because docker build's trailing PATH is *also* called a context, and "./build.ts".DockerBuildSettings.context already means that one.
host host(address: string): this The daemon socket to connect to (--host), e.g. ssh://build@host.
logLevel logLevel(level: DockerLogLevel): this How much the client logs (--log-level).
config config(path: PathLike): this Where the client config lives (--config).
debug debug(): this Enable client debug output (--debug).
#

DockerStartSettings

class
class DockerStartSettings extends DockerContainerListSettings

Settings for docker start.

MemberSignatureDoc
attach attach(): this Attach STDOUT/STDERR and forward signals (-a).
#

DockerStatsSettings

class
class DockerStatsSettings extends DockerSettings

Settings for docker stats.

MemberSignatureDoc
containers containers(...names: string[]): this Limit the report to these containers; omit for all running ones.
all all(): this Include stopped containers (-a/--all).
format format(template: string): this Render through a Go template (--format).
#

DockerStopSettings

class
class DockerStopSettings extends DockerContainerListSettings

Settings for docker stop.

MemberSignatureDoc
time time(seconds: number): this Seconds to wait before killing (-t).
#

DockerSystemSettings

class
class DockerSystemSettings extends DockerSettings

Settings for docker system. Pick the subcommand with prune, df, or info.

MemberSignatureDoc
prune prune(): this Reclaim space (system prune).
df df(): this Report what is using disk (system df).
info info(): this Describe the daemon (system info).
all all(): this Prune every unused image, not only the dangling ones (--all) — the difference between reclaiming a little space and reclaiming a lot.
force force(): this Do not prompt for confirmation (--force), which a build always needs.
volumes volumes(): this Also remove unused volumes (--volumes), which a prune otherwise keeps.
filter filter(...expressions: string[]): this Limit what is pruned (--filter), e.g. until=24h; repeatable.
verbose verbose(): this Break the df report down per object (-v/--verbose).
format format(template: string): this Render through a Go template (--format).
#

DockerTagSettings

class
class DockerTagSettings extends DockerSettings

Settings for docker tag.

MemberSignatureDoc
source source(reference: string): this The existing image reference (required).
target target(reference: string): this The new image reference (required).
#

DockerTasks

const
const DockerTasks: DockerTasksApi

Typed task functions for the docker CLI.

#

DockerTasksApi

interface
interface DockerTasksApi

The shape of DockerTasks.

MemberSignatureDoc
build build(configure?: Configure<DockerBuildSettings>): Promise<CommandOutput> Build an image: docker build.
run run(configure?: Configure<DockerRunSettings>): Promise<CommandOutput> Run a container: docker run.
create create(configure?: Configure<DockerCreateSettings>): Promise<CommandOutput> Create a container without starting it: docker create.
exec exec(configure?: Configure<DockerExecSettings>): Promise<CommandOutput> Run a command in a container: docker exec.
start start(configure?: Configure<DockerStartSettings>): Promise<CommandOutput> Start containers: docker start.
stop stop(configure?: Configure<DockerStopSettings>): Promise<CommandOutput> Stop containers: docker stop.
restart restart(configure?: Configure<DockerRestartSettings>): Promise<CommandOutput> Restart containers: docker restart.
kill kill(configure?: Configure<DockerKillSettings>): Promise<CommandOutput> Signal containers: docker kill.
pause pause(configure?: Configure<DockerPauseSettings>): Promise<CommandOutput> Suspend a container's processes: docker pause.
unpause unpause(configure?: Configure<DockerUnpauseSettings>): Promise<CommandOutput> Resume them: docker unpause.
rm rm(configure?: Configure<DockerRmSettings>): Promise<CommandOutput> Remove containers: docker rm.
wait wait(configure?: Configure<DockerWaitSettings>): Promise<CommandOutput> Block until containers stop, then print their exit codes: docker wait — how a build gets a test container's result rather than the runner's.
rename rename(configure?: Configure<DockerRenameSettings>): Promise<CommandOutput> Rename a container: docker rename.
update update(configure?: Configure<DockerUpdateSettings>): Promise<CommandOutput> Change a container's resource limits: docker update.
ps ps(configure?: Configure<DockerPsSettings>): Promise<CommandOutput> List containers: docker ps.
psEntries psEntries(configure?: Configure<DockerPsSettings>): Promise<DockerContainerEntry[]> The containers as parsed DockerContainerEntry values, from docker ps --format '{{json .}}'.
logs logs(configure?: Configure<DockerLogsSettings>): Promise<CommandOutput> Read a container's logs: docker logs.
inspect inspect(configure?: Configure<DockerInspectSettings>): Promise<CommandOutput> Describe docker objects: docker inspect.
top top(configure?: Configure<DockerTopSettings>): Promise<CommandOutput> List a container's processes: docker top.
stats stats(configure?: Configure<DockerStatsSettings>): Promise<CommandOutput> Sample resource usage once: docker stats --no-stream.
port port(configure?: Configure<DockerPortSettings>): Promise<CommandOutput> Show a container's port mappings: docker port.
diff diff(configure?: Configure<DockerDiffSettings>): Promise<CommandOutput> Show a container's filesystem changes: docker diff.
cp cp(configure?: Configure<DockerCpSettings>): Promise<CommandOutput> Copy files between a container and the host: docker cp.
commit commit(configure?: Configure<DockerCommitSettings>): Promise<CommandOutput> Turn a container into an image: docker commit.
export export(configure?: Configure<DockerExportSettings>): Promise<CommandOutput> Export a container's filesystem: docker export.
images images(configure?: Configure<DockerImagesSettings>): Promise<CommandOutput> List images: docker images.
imageEntries imageEntries(configure?: Configure<DockerImagesSettings>): Promise<DockerImageEntry[]> The images as parsed DockerImageEntry values, from docker images --format '{{json .}}'.
pull pull(configure?: Configure<DockerPullSettings>): Promise<CommandOutput> Pull an image: docker pull.
push push(configure?: Configure<DockerPushSettings>): Promise<CommandOutput> Push an image: docker push.
tag tag(configure?: Configure<DockerTagSettings>): Promise<CommandOutput> Tag an image: docker tag.
rmi rmi(configure?: Configure<DockerRmiSettings>): Promise<CommandOutput> Remove images: docker rmi.
save save(configure?: Configure<DockerSaveSettings>): Promise<CommandOutput> Save images to a tar archive: docker save.
load load(configure?: Configure<DockerLoadSettings>): Promise<CommandOutput> Load images from a tar archive: docker load.
history history(configure?: Configure<DockerHistorySettings>): Promise<CommandOutput> Show an image's layers: docker history.
import import(configure?: Configure<DockerImportSettings>): Promise<CommandOutput> Create an image from a tarball: docker import.
imagePrune imagePrune(configure?: Configure<DockerImagePruneSettings>): Promise<CommandOutput> Remove unused images: docker image prune.
login login(configure?: Configure<DockerLoginSettings>): Promise<CommandOutput> Authenticate to a registry: docker login.
logout logout(configure?: Configure<DockerLogoutSettings>): Promise<CommandOutput> Forget a registry's credentials: docker logout.
search search(configure?: Configure<DockerSearchSettings>): Promise<CommandOutput> Search Docker Hub: docker search.
info info(configure?: Configure<DockerInfoSettings>): Promise<CommandOutput> Describe the daemon: docker info.
version version(configure?: Configure<DockerVersionSettings>): Promise<CommandOutput> Report client and daemon versions: docker version.
system system(configure?: Configure<DockerSystemSettings>): Promise<CommandOutput> Reclaim space or report usage: docker system prune|df|info.
volume volume(configure?: Configure<DockerVolumeSettings>): Promise<CommandOutput> Manage volumes: docker volume create|ls|rm|inspect|prune.
volumeNames volumeNames(configure?: Configure<DockerVolumeSettings>): Promise<string[]> The volume names, from docker volume ls --format '{{.Name}}'.
network network(configure?: Configure<DockerNetworkSettings>): Promise<CommandOutput> Manage networks: docker network create|ls|rm|inspect|connect|….
networkNames networkNames(configure?: Configure<DockerNetworkSettings>): Promise<string[]> The network names, from docker network ls --format '{{.Name}}'.
context context(configure?: Configure<DockerContextSettings>): Promise<CommandOutput> Manage the daemons to talk to: docker context create|ls|use|….
#

DockerTopSettings

class
class DockerTopSettings extends DockerSettings

Settings for docker top.

MemberSignatureDoc
container container(name: string): this The container whose processes to list (required).
psArgs psArgs(...args: string[]): this Arguments passed through to ps inside the container.
#

DockerUnpauseSettings

class
class DockerUnpauseSettings extends DockerContainerListSettings

Settings for docker unpause.

#

DockerUpdateSettings

class
class DockerUpdateSettings extends DockerContainerListSettings

Settings for docker update.

MemberSignatureDoc
memory memory(limit: string): this The memory limit (--memory), e.g. 512m.
cpus cpus(count: string): this How many CPUs the container may use (--cpus).
restart restart(policy: string): this The restart policy (--restart).
#

DockerVersionSettings

class
class DockerVersionSettings extends DockerSettings

Settings for docker version.

MemberSignatureDoc
format format(template: string): this Render through a Go template (--format), e.g. {{.Server.Version}} to read just the daemon's version.
#

DockerVolumeSettings

class
class DockerVolumeSettings extends DockerSettings

Settings for docker volume. Pick the subcommand with create, ls, remove, inspect, or prune.

MemberSignatureDoc
create create(name?: string): this Create a volume (volume create [<name>]).
ls ls(): this List volumes (volume ls), the default.
remove remove(...names: string[]): this Remove volumes (volume rm <name>...).
inspect inspect(...names: string[]): this Describe volumes (volume inspect <name>...).
prune prune(): this Remove the volumes nothing uses (volume prune).
driver driver(name: string): this The volume driver (--driver), for a created volume.
label label(key: string, value: string): this Attach metadata (--label); repeatable.
opt opt(key: string, value: string): this A driver-specific option (--opt); repeatable.
filter filter(...expressions: string[]): this Filter a listing or a prune (--filter); repeatable.
format format(template: string): this Render each volume through a Go template (--format). "./docker.ts".DockerTasks.volumeNames pins {{.Name}}.
quietOutput quietOutput(): this Only print volume names (-q/--quiet).
force force(): this Do not prompt, and remove even a volume in use where docker allows it (--force).
all all(): this Prune anonymous *and* named volumes (--all), not only anonymous ones.
#

DockerWaitSettings

class
class DockerWaitSettings extends DockerContainerListSettings

Settings for docker wait — blocking until the containers stop, then printing their exit codes, which is how a build gets a test container's result rather than the runner's.