Documentation

Client extends Client

Table of Contents

FETCH_OBJECT  = 'object'
FETCH_RESPONSE  = 'response'
$httpClient  : ClientInterface
$requestFactory  : RequestFactoryInterface
$serializer  : SerializerInterface
$streamFactory  : StreamFactoryInterface
__construct()  : mixed
buildPrune()  : BuildPrunePostResponse200|ResponseInterface|null
configCreate()  : IdResponse|ResponseInterface|null
configDelete()  : ResponseInterface|null
configInspect()  : Config|ResponseInterface|null
configList()  : array<string|int, Config>|ResponseInterface|null
configUpdate()  : ResponseInterface|null
containerArchive()  : ResponseInterface|null
Get a tar archive of a resource in the filesystem of container id.
containerArchiveInfo()  : ResponseInterface|null
A response header `X-Docker-Container-Path-Stat` is returned, containing.
containerAttach()  : ResponseInterface|null
Attach to a container to read its output or send it input. You can attach.
containerAttachWebsocket()  : ResponseInterface|null
containerChanges()  : array<string|int, ContainersIdChangesGetResponse200Item>|ResponseInterface|null
Returns which files in a container's filesystem have been added, deleted,.
containerCreate()  : ContainersCreatePostResponse201|ResponseInterface|null
containerDelete()  : ResponseInterface|null
containerExec()  : IdResponse|ResponseInterface|null
Run a command inside a running container.
containerExport()  : ResponseInterface|null
Export the contents of a container as a tarball.
containerInspect()  : ContainersIdJsonGetResponse200|ResponseInterface|null
Return low-level information about a container.
containerKill()  : ResponseInterface|null
Send a POSIX signal to a container, defaulting to killing to the.
containerList()  : array<string|int, ContainerSummaryItem>|ResponseInterface|null
Returns a list of containers. For details on the format, see the.
containerLogs()  : ResponseInterface|null
Get `stdout` and `stderr` logs from a container.
containerPause()  : ResponseInterface|null
Use the freezer cgroup to suspend all processes in a container.
containerPrune()  : ContainersPrunePostResponse200|ResponseInterface|null
containerRename()  : ResponseInterface|null
containerResize()  : ResponseInterface|null
Resize the TTY for a container.
containerRestart()  : ResponseInterface|null
containerStart()  : ResponseInterface|null
containerStats()  : ResponseInterface|null
This endpoint returns a live stream of a container’s resource usage.
containerStop()  : ResponseInterface|null
containerTop()  : ContainersIdTopGetResponse200|ResponseInterface|null
On Unix systems, this is done by running the `ps` command. This endpoint.
containerUnpause()  : ResponseInterface|null
Resume a container which has been paused.
containerUpdate()  : ContainersIdUpdatePostResponse200|ResponseInterface|null
Change various configuration options of a container without having to.
containerWait()  : ContainersIdWaitPostResponse200|ResponseInterface|null
Block until a container stops, then returns the exit code.
create()  : mixed
distributionInspect()  : DistributionNameJsonGetResponse200|ResponseInterface|null
Return image digest and platform information by contacting the registry.
execInspect()  : ExecIdJsonGetResponse200|ResponseInterface|null
Return low-level information about an exec instance.
execResize()  : ResponseInterface|null
Resize the TTY session used by an exec instance. This endpoint only works.
execStart()  : ResponseInterface|null
Starts a previously set up exec instance. If detach is true, this endpoint.
executeEndpoint()  : mixed
getPluginPrivileges()  : array<string|int, PluginsPrivilegesGetResponse200Item>|ResponseInterface|null
imageBuild()  : ResponseInterface|null
Build an image from a tar archive with a `Dockerfile` in it.
imageCommit()  : IdResponse|ResponseInterface|null
imageCreate()  : ResponseInterface|null
Create an image by either pulling it from a registry or importing it.
imageDelete()  : array<string|int, ImageDeleteResponseItem>|ResponseInterface|null
Remove an image, along with any untagged parent images that were.
imageGet()  : ResponseInterface|null
Get a tarball containing all images and metadata for a repository.
imageGetAll()  : ResponseInterface|null
Get a tarball containing all images and metadata for several image.
imageHistory()  : array<string|int, ImagesNameHistoryGetResponse200Item>|ResponseInterface|null
Return parent layers of an image.
imageInspect()  : Image|ResponseInterface|null
Return low-level information about an image.
imageList()  : array<string|int, ImageSummary>|ResponseInterface|null
Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image.
imageLoad()  : ResponseInterface|null
Load a set of images and tags into a repository.
imagePrune()  : ImagesPrunePostResponse200|ResponseInterface|null
imagePush()  : ResponseInterface|null
Push an image to a registry.
imageSearch()  : array<string|int, ImagesSearchGetResponse200Item>|ResponseInterface|null
Search for an image on Docker Hub.
imageTag()  : ResponseInterface|null
Tag an image so that it becomes part of a repository.
networkConnect()  : ResponseInterface|null
networkCreate()  : NetworksCreatePostResponse201|ResponseInterface|null
networkDelete()  : ResponseInterface|null
networkDisconnect()  : ResponseInterface|null
networkInspect()  : Network|ResponseInterface|null
networkList()  : array<string|int, Network>|ResponseInterface|null
Returns a list of networks. For details on the format, see the.
networkPrune()  : NetworksPrunePostResponse200|ResponseInterface|null
nodeDelete()  : ResponseInterface|null
nodeInspect()  : Node|ResponseInterface|null
nodeList()  : array<string|int, Node>|ResponseInterface|null
nodeUpdate()  : ResponseInterface|null
pluginCreate()  : ResponseInterface|null
pluginDelete()  : Plugin|ResponseInterface|null
pluginDisable()  : ResponseInterface|null
pluginEnable()  : ResponseInterface|null
pluginInspect()  : Plugin|ResponseInterface|null
pluginList()  : array<string|int, Plugin>|ResponseInterface|null
Returns information about installed plugins.
pluginPull()  : ResponseInterface|null
Pulls and installs a plugin. After the plugin is installed, it can be.
pluginPush()  : ResponseInterface|null
Push a plugin to the registry.
pluginSet()  : ResponseInterface|null
pluginUpgrade()  : ResponseInterface|null
putContainerArchive()  : ResponseInterface|null
Upload a tar archive to be extracted to a path in the filesystem of container id.
secretCreate()  : IdResponse|ResponseInterface|null
secretDelete()  : ResponseInterface|null
secretInspect()  : Secret|ResponseInterface|null
secretList()  : array<string|int, Secret>|ResponseInterface|null
secretUpdate()  : ResponseInterface|null
serviceCreate()  : ServicesCreatePostResponse201|ResponseInterface|null
serviceDelete()  : ResponseInterface|null
serviceInspect()  : Service|ResponseInterface|null
serviceList()  : array<string|int, Service>|ResponseInterface|null
serviceLogs()  : ResponseInterface|null
Get `stdout` and `stderr` logs from a service. See also.
serviceUpdate()  : ServiceUpdateResponse|ResponseInterface|null
session()  : ResponseInterface|null
swarmInit()  : ResponseInterface|null
swarmInspect()  : Swarm|ResponseInterface|null
swarmJoin()  : ResponseInterface|null
swarmLeave()  : ResponseInterface|null
swarmUnlock()  : ResponseInterface|null
swarmUnlockkey()  : SwarmUnlockkeyGetResponse200|ResponseInterface|null
swarmUpdate()  : ResponseInterface|null
systemAuth()  : AuthPostResponse200|ResponseInterface|null
Validate credentials for a registry and, if available, get an identity.
systemDataUsage()  : SystemDfGetResponse200|ResponseInterface|null
systemEvents()  : EventsGetResponse200|ResponseInterface|null
Stream real-time events from the server.
systemInfo()  : SystemInfo|ResponseInterface|null
systemPing()  : ResponseInterface|null
systemPingHead()  : ResponseInterface|null
systemVersion()  : SystemVersion|ResponseInterface|null
taskInspect()  : Task|ResponseInterface|null
taskList()  : array<string|int, Task>|ResponseInterface|null
taskLogs()  : ResponseInterface|null
Get `stdout` and `stderr` logs from a task.
volumeCreate()  : Volume|ResponseInterface|null
volumeDelete()  : ResponseInterface|null
Instruct the driver to remove the volume.
volumeInspect()  : Volume|ResponseInterface|null
volumeList()  : VolumesGetResponse200|ResponseInterface|null
volumePrune()  : VolumesPrunePostResponse200|ResponseInterface|null

Constants

FETCH_OBJECT

public mixed FETCH_OBJECT = 'object'

FETCH_RESPONSE

public mixed FETCH_RESPONSE = 'response'

Properties

$httpClient

protected ClientInterface $httpClient

$requestFactory

protected RequestFactoryInterface $requestFactory

$serializer

protected SerializerInterface $serializer

$streamFactory

protected StreamFactoryInterface $streamFactory

Methods

__construct()

public __construct(ClientInterface $httpClient, RequestFactoryInterface $requestFactory, SerializerInterface $serializer, StreamFactoryInterface $streamFactory) : mixed
Parameters
$httpClient : ClientInterface
$requestFactory : RequestFactoryInterface
$serializer : SerializerInterface
$streamFactory : StreamFactoryInterface
Return values
mixed

buildPrune()

public buildPrune([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : BuildPrunePostResponse200|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var int $keep-storage Amount of disk space in bytes to keep for cache
@var bool $all Remove all types of build cache
@var string $filters A JSON encoded value of the filters (a `map[string][]string`) to

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
BuildPruneInternalServerErrorException
Return values
BuildPrunePostResponse200|ResponseInterface|null

configList()

public configList([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, Config>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters A JSON encoded value of the filters (a `map[string][]string`) to

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ConfigListInternalServerErrorException
throws
ConfigListServiceUnavailableException
Return values
array<string|int, Config>|ResponseInterface|null

configUpdate()

public configUpdate(string $id, ConfigSpec $body[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

The ID or name of the config

$body : ConfigSpec

The spec of the config to update. Currently, only the Labels field

$queryParameters : array<string|int, mixed> = []

{

@var int $version The version number of the config object being updated. This is

required to avoid conflicting writes.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ConfigUpdateBadRequestException
throws
ConfigUpdateNotFoundException
throws
ConfigUpdateInternalServerErrorException
throws
ConfigUpdateServiceUnavailableException
Return values
ResponseInterface|null

containerArchive()

Get a tar archive of a resource in the filesystem of container id.

public containerArchive(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var string $path Resource in the container’s filesystem to archive.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerArchiveBadRequestException
throws
ContainerArchiveNotFoundException
throws
ContainerArchiveInternalServerErrorException
Return values
ResponseInterface|null

containerArchiveInfo()

A response header `X-Docker-Container-Path-Stat` is returned, containing.

public containerArchiveInfo(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var string $path Resource in the container’s filesystem to archive.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerArchiveInfoBadRequestException
throws
ContainerArchiveInfoNotFoundException
throws
ContainerArchiveInfoInternalServerErrorException
Return values
ResponseInterface|null

containerAttach()

Attach to a container to read its output or send it input. You can attach.

public containerAttach(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var string $detachKeys Override the key sequence for detaching a container.Format is a single
@var bool $logs Replay previous logs from the container.

@var bool $stream Stream attached streams from the time the request was made onwards.

@var bool $stdin Attach to `stdin`
@var bool $stdout Attach to `stdout`
@var bool $stderr Attach to `stderr`

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerAttachBadRequestException
throws
ContainerAttachNotFoundException
throws
ContainerAttachInternalServerErrorException
Return values
ResponseInterface|null

containerAttachWebsocket()

public containerAttachWebsocket(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var string $detachKeys Override the key sequence for detaching a container.Format is a single
@var bool $logs Return logs
@var bool $stream Return stream
@var bool $stdin Attach to `stdin`
@var bool $stdout Attach to `stdout`
@var bool $stderr Attach to `stderr`

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerAttachWebsocketBadRequestException
throws
ContainerAttachWebsocketNotFoundException
throws
ContainerAttachWebsocketInternalServerErrorException
Return values
ResponseInterface|null

containerChanges()

Returns which files in a container's filesystem have been added, deleted,.

public containerChanges(string $id[, string $fetch = self::FETCH_OBJECT ]) : array<string|int, ContainersIdChangesGetResponse200Item>|ResponseInterface|null
Parameters
$id : string

ID or name of the container

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerChangesNotFoundException
throws
ContainerChangesInternalServerErrorException
Return values
array<string|int, ContainersIdChangesGetResponse200Item>|ResponseInterface|null

containerCreate()

public containerCreate(ContainersCreatePostBody $body[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ContainersCreatePostResponse201|ResponseInterface|null
Parameters
$body : ContainersCreatePostBody

Container to create

$queryParameters : array<string|int, mixed> = []

{

@var string $name Assign the specified name to the container. Must match

/?[a-zA-Z0-9][a-zA-Z0-9_.-]+.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerCreateBadRequestException
throws
ContainerCreateNotFoundException
throws
ContainerCreateConflictException
throws
ContainerCreateInternalServerErrorException
Return values
ContainersCreatePostResponse201|ResponseInterface|null

containerDelete()

public containerDelete(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var bool $v remove the volumes associated with the container
@var bool $force if the container is running, kill it before removing it
@var bool $link Remove the specified link associated with the container.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerDeleteBadRequestException
throws
ContainerDeleteNotFoundException
throws
ContainerDeleteConflictException
throws
ContainerDeleteInternalServerErrorException
Return values
ResponseInterface|null

containerExec()

Run a command inside a running container.

public containerExec(string $id, ContainersIdExecPostBody $execConfig[, string $fetch = self::FETCH_OBJECT ]) : IdResponse|ResponseInterface|null
Parameters
$id : string

ID or name of container

$execConfig : ContainersIdExecPostBody

Exec configuration

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerExecNotFoundException
throws
ContainerExecConflictException
throws
ContainerExecInternalServerErrorException
Return values
IdResponse|ResponseInterface|null

containerExport()

Export the contents of a container as a tarball.

public containerExport(string $id[, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerExportNotFoundException
throws
ContainerExportInternalServerErrorException
Return values
ResponseInterface|null

containerInspect()

Return low-level information about a container.

public containerInspect(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ContainersIdJsonGetResponse200|ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var bool $size Return the size of container as fields `SizeRw` and `SizeRootFs`

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerInspectNotFoundException
throws
ContainerInspectInternalServerErrorException
Return values
ContainersIdJsonGetResponse200|ResponseInterface|null

containerKill()

Send a POSIX signal to a container, defaulting to killing to the.

public containerKill(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var string $signal Signal to send to the container as an integer or string (e.g. `SIGINT`)

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerKillNotFoundException
throws
ContainerKillConflictException
throws
ContainerKillInternalServerErrorException
Return values
ResponseInterface|null

containerList()

Returns a list of containers. For details on the format, see the.

public containerList([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, ContainerSummaryItem>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var bool $all Return all containers. By default, only running containers are shown.

@var int $limit Return this number of most recently created containers, including
@var bool $size Return the size of container as fields `SizeRw` and `SizeRootFs`.

@var string $filters Filters to process on the container list, encoded as JSON (a

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerListBadRequestException
throws
ContainerListInternalServerErrorException
Return values
array<string|int, ContainerSummaryItem>|ResponseInterface|null

containerLogs()

Get `stdout` and `stderr` logs from a container.

public containerLogs(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var bool $follow keep connection after returning logs
@var bool $stdout Return logs from `stdout`
@var bool $stderr Return logs from `stderr`
@var int $since Only return logs since this time, as a UNIX timestamp
@var int $until Only return logs before this time, as a UNIX timestamp
@var bool $timestamps Add timestamps to every log line
@var string $tail Only return this number of log lines from the end of the logs.

Specify as an integer or all to output all log lines.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerLogsNotFoundException
throws
ContainerLogsInternalServerErrorException
Return values
ResponseInterface|null

containerPause()

Use the freezer cgroup to suspend all processes in a container.

public containerPause(string $id[, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerPauseNotFoundException
throws
ContainerPauseInternalServerErrorException
Return values
ResponseInterface|null

containerPrune()

public containerPrune([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ContainersPrunePostResponse200|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`).

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerPruneInternalServerErrorException
Return values
ContainersPrunePostResponse200|ResponseInterface|null

containerRename()

public containerRename(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var string $name New name for the container

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerRenameNotFoundException
throws
ContainerRenameConflictException
throws
ContainerRenameInternalServerErrorException
Return values
ResponseInterface|null

containerResize()

Resize the TTY for a container.

public containerResize(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var int $h Height of the TTY session in characters
@var int $w Width of the TTY session in characters

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerResizeNotFoundException
throws
ContainerResizeInternalServerErrorException
Return values
ResponseInterface|null

containerRestart()

public containerRestart(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var int $t Number of seconds to wait before killing the container

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerRestartNotFoundException
throws
ContainerRestartInternalServerErrorException
Return values
ResponseInterface|null

containerStart()

public containerStart(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var string $detachKeys Override the key sequence for detaching a container. Format is a

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerStartNotFoundException
throws
ContainerStartInternalServerErrorException
Return values
ResponseInterface|null

containerStats()

This endpoint returns a live stream of a container’s resource usage.

public containerStats(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null

statistics.

The precpu_stats is the CPU statistic of the previous read, and is used to calculate the CPU usage percentage. It is not an exact copy of the cpu_stats field.

If either precpu_stats.online_cpus or cpu_stats.online_cpus is nil then for compatibility with older daemons the length of the corresponding cpu_usage.percpu_usage array should be used.

To calculate the values shown by the stats command of the docker cli tool the following formulas can be used: used_memory = memory_stats.usage - memory_stats.stats.cache available_memory = memory_stats.limit Memory usage % = (used_memory / available_memory) * 100.0 cpu_delta = cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage system_cpu_delta = cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage number_cpus = lenght(cpu_stats.cpu_usage.percpu_usage) or cpu_stats.online_cpus CPU usage % = (cpu_delta / system_cpu_delta) * number_cpus * 100.0

Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var bool $stream Stream the output. If false, the stats will be output once and then

it will disconnect.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerStatsNotFoundException
throws
ContainerStatsInternalServerErrorException
Return values
ResponseInterface|null

containerStop()

public containerStop(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var int $t Number of seconds to wait before killing the container

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerStopNotFoundException
throws
ContainerStopInternalServerErrorException
Return values
ResponseInterface|null

containerTop()

On Unix systems, this is done by running the `ps` command. This endpoint.

public containerTop(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ContainersIdTopGetResponse200|ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var string $ps_args The arguments to pass to `ps`. For example, `aux`

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerTopNotFoundException
throws
ContainerTopInternalServerErrorException
Return values
ContainersIdTopGetResponse200|ResponseInterface|null

containerUnpause()

Resume a container which has been paused.

public containerUnpause(string $id[, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerUnpauseNotFoundException
throws
ContainerUnpauseInternalServerErrorException
Return values
ResponseInterface|null

containerUpdate()

Change various configuration options of a container without having to.

public containerUpdate(string $id, ContainersIdUpdatePostBody $update[, string $fetch = self::FETCH_OBJECT ]) : ContainersIdUpdatePostResponse200|ResponseInterface|null
Parameters
$id : string

ID or name of the container

$update : ContainersIdUpdatePostBody
$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerUpdateNotFoundException
throws
ContainerUpdateInternalServerErrorException
Return values
ContainersIdUpdatePostResponse200|ResponseInterface|null

containerWait()

Block until a container stops, then returns the exit code.

public containerWait(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ContainersIdWaitPostResponse200|ResponseInterface|null
Parameters
$id : string

ID or name of the container

$queryParameters : array<string|int, mixed> = []

{

@var string $condition Wait until a container state reaches the given condition, either

'not-running' (default), 'next-exit', or 'removed'.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ContainerWaitNotFoundException
throws
ContainerWaitInternalServerErrorException
Return values
ContainersIdWaitPostResponse200|ResponseInterface|null

create()

public static create([mixed $httpClient = null ][, array<string|int, mixed> $additionalPlugins = [] ]) : mixed
Parameters
$httpClient : mixed = null
$additionalPlugins : array<string|int, mixed> = []
Return values
mixed

distributionInspect()

Return image digest and platform information by contacting the registry.

public distributionInspect(string $name[, string $fetch = self::FETCH_OBJECT ]) : DistributionNameJsonGetResponse200|ResponseInterface|null
Parameters
$name : string

Image name or id

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
DistributionInspectUnauthorizedException
throws
DistributionInspectInternalServerErrorException
Return values
DistributionNameJsonGetResponse200|ResponseInterface|null

execResize()

Resize the TTY session used by an exec instance. This endpoint only works.

public execResize(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

Exec instance ID

$queryParameters : array<string|int, mixed> = []

{

@var int $h Height of the TTY session in characters
@var int $w Width of the TTY session in characters

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ExecResizeNotFoundException
Return values
ResponseInterface|null

execStart()

Starts a previously set up exec instance. If detach is true, this endpoint.

public execStart(string $id, ExecIdStartPostBody $execStartConfig[, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

Exec instance ID

$execStartConfig : ExecIdStartPostBody
$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ExecStartNotFoundException
throws
ExecStartConflictException
Return values
ResponseInterface|null

executeEndpoint()

public executeEndpoint(Endpoint $endpoint[, string $fetch = self::FETCH_OBJECT ]) : mixed
Parameters
$endpoint : Endpoint
$fetch : string = self::FETCH_OBJECT
Return values
mixed

getPluginPrivileges()

public getPluginPrivileges([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, PluginsPrivilegesGetResponse200Item>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $remote The name of the plugin. The `:latest` tag is optional, and is the

default if omitted.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
GetPluginPrivilegesInternalServerErrorException
Return values
array<string|int, PluginsPrivilegesGetResponse200Item>|ResponseInterface|null

imageBuild()

Build an image from a tar archive with a `Dockerfile` in it.

public imageBuild(string|resource|StreamInterface $inputStream[, array<string|int, mixed> $queryParameters = [] ][, array<string|int, mixed> $headerParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$inputStream : string|resource|StreamInterface

a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz

$queryParameters : array<string|int, mixed> = []

{

@var string $dockerfile Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`.
@var string $t A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters.
@var string $extrahosts Extra hosts to add to /etc/hosts
@var string $remote A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball.
@var bool $q suppress verbose build output
@var bool $nocache do not use the cache when building the image
@var string $cachefrom JSON array of images used for build cache resolution
@var string $pull attempt to pull the image even if an older image exists locally
@var bool $rm remove intermediate containers after a successful build
@var bool $forcerm always remove intermediate containers, even upon failure
@var int $memory set memory limit for build
@var int $memswap Total memory (memory + swap). Set as `-1` to disable swap.
@var int $cpushares CPU shares (relative weight)
@var string $cpusetcpus CPUs in which to allow execution (e.g., `0-3`, `0,1`).
@var int $cpuperiod the length of a CPU period in microseconds
@var int $cpuquota microseconds of CPU time that the container can get in a CPU period
@var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values.

@var int $shmsize Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB.
@var bool $squash Squash the resulting images layers into a single layer. *(Experimental release only.)*
@var string $labels arbitrary key/value labels to set on the image, as a JSON map of string pairs
@var string $networkmode Sets the networking mode for the run commands during build. Supported
@var string $platform Platform in the format os[/arch[/variant]]
@var string $target Target build stage
@var string $outputs BuildKit output configuration

}

$headerParameters : array<string|int, mixed> = []

{

@var string $Content-type
@var string $X-Registry-Config This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageBuildBadRequestException
throws
ImageBuildInternalServerErrorException
Return values
ResponseInterface|null

imageCommit()

public imageCommit(ContainerConfig $containerConfig[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : IdResponse|ResponseInterface|null
Parameters
$containerConfig : ContainerConfig

The container configuration

$queryParameters : array<string|int, mixed> = []

{

@var string $container The ID or name of the container to commit
@var string $repo Repository name for the created image
@var string $tag Tag name for the create image
@var string $comment Commit message
@var string $author Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)
@var bool $pause Whether to pause the container before committing
@var string $changes `Dockerfile` instructions to apply while committing

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageCommitNotFoundException
throws
ImageCommitInternalServerErrorException
Return values
IdResponse|ResponseInterface|null

imageCreate()

Create an image by either pulling it from a registry or importing it.

public imageCreate(string $inputImage[, array<string|int, mixed> $queryParameters = [] ][, array<string|int, mixed> $headerParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$inputImage : string

Image content if the value - has been specified in fromSrc query parameter

$queryParameters : array<string|int, mixed> = []

{

@var string $fromImage Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed.
@var string $fromSrc Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image.
@var string $repo Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image.
@var string $tag Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled.
@var string $message set commit message for imported image
@var string $platform Platform in the format os[/arch[/variant]]

}

$headerParameters : array<string|int, mixed> = []

{

@var string $X-Registry-Auth A base64url-encoded auth configuration.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageCreateNotFoundException
throws
ImageCreateInternalServerErrorException
Return values
ResponseInterface|null

imageDelete()

Remove an image, along with any untagged parent images that were.

public imageDelete(string $name[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, ImageDeleteResponseItem>|ResponseInterface|null
Parameters
$name : string

Image name or ID

$queryParameters : array<string|int, mixed> = []

{

@var bool $force Remove the image even if it is being used by stopped containers or has other tags
@var bool $noprune Do not delete untagged parent images

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageDeleteNotFoundException
throws
ImageDeleteConflictException
throws
ImageDeleteInternalServerErrorException
Return values
array<string|int, ImageDeleteResponseItem>|ResponseInterface|null

imageGet()

Get a tarball containing all images and metadata for a repository.

public imageGet(string $name[, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$name : string

Image name or ID

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageGetInternalServerErrorException
Return values
ResponseInterface|null

imageGetAll()

Get a tarball containing all images and metadata for several image.

public imageGetAll([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var array $names Image names to filter by

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageGetAllInternalServerErrorException
Return values
ResponseInterface|null

imageHistory()

Return parent layers of an image.

public imageHistory(string $name[, string $fetch = self::FETCH_OBJECT ]) : array<string|int, ImagesNameHistoryGetResponse200Item>|ResponseInterface|null
Parameters
$name : string

Image name or ID

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageHistoryNotFoundException
throws
ImageHistoryInternalServerErrorException
Return values
array<string|int, ImagesNameHistoryGetResponse200Item>|ResponseInterface|null

imageInspect()

Return low-level information about an image.

public imageInspect(string $name[, string $fetch = self::FETCH_OBJECT ]) : Image|ResponseInterface|null
Parameters
$name : string

Image name or id

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageInspectNotFoundException
throws
ImageInspectInternalServerErrorException
Return values
Image|ResponseInterface|null

imageList()

Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image.

public imageList([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, ImageSummary>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var bool $all Show all images. Only images from a final layer (no children) are shown by default.
@var string $filters A JSON encoded value of the filters (a `map[string][]string`) to
@var bool $digests Show digest information as a `RepoDigests` field on each image.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageListInternalServerErrorException
Return values
array<string|int, ImageSummary>|ResponseInterface|null

imageLoad()

Load a set of images and tags into a repository.

public imageLoad(string|resource|StreamInterface $imagesTarball[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$imagesTarball : string|resource|StreamInterface

Tar archive containing images

$queryParameters : array<string|int, mixed> = []

{

@var bool $quiet Suppress progress details during load.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageLoadInternalServerErrorException
Return values
ResponseInterface|null

imagePrune()

public imagePrune([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ImagesPrunePostResponse200|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
  • dangling=<boolean> When set to true (or 1), prune only unused and untagged images. When set to false }
$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImagePruneInternalServerErrorException
Return values
ImagesPrunePostResponse200|ResponseInterface|null

imagePush()

Push an image to a registry.

public imagePush(string $name[, array<string|int, mixed> $queryParameters = [] ][, array<string|int, mixed> $headerParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$name : string

image name or ID

$queryParameters : array<string|int, mixed> = []

{

@var string $tag The tag to associate with the image on the registry.

}

$headerParameters : array<string|int, mixed> = []

{

@var string $X-Registry-Auth A base64url-encoded auth configuration.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImagePushNotFoundException
throws
ImagePushInternalServerErrorException
Return values
ResponseInterface|null

imageSearch()

Search for an image on Docker Hub.

public imageSearch([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, ImagesSearchGetResponse200Item>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $term Term to search
@var int $limit Maximum number of results to return
@var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageSearchInternalServerErrorException
Return values
array<string|int, ImagesSearchGetResponse200Item>|ResponseInterface|null

imageTag()

Tag an image so that it becomes part of a repository.

public imageTag(string $name[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$name : string

image name or ID to tag

$queryParameters : array<string|int, mixed> = []

{

@var string $repo The repository to tag in. For example, `someuser/someimage`.
@var string $tag The name of the new tag.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ImageTagBadRequestException
throws
ImageTagNotFoundException
throws
ImageTagConflictException
throws
ImageTagInternalServerErrorException
Return values
ResponseInterface|null

networkConnect()

public networkConnect(string $id, NetworksIdConnectPostBody $container[, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

Network ID or name

$container : NetworksIdConnectPostBody
$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
NetworkConnectForbiddenException
throws
NetworkConnectNotFoundException
throws
NetworkConnectInternalServerErrorException
Return values
ResponseInterface|null

networkCreate()

public networkCreate(NetworksCreatePostBody $networkConfig[, string $fetch = self::FETCH_OBJECT ]) : NetworksCreatePostResponse201|ResponseInterface|null
Parameters
$networkConfig : NetworksCreatePostBody

Network configuration

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
NetworkCreateForbiddenException
throws
NetworkCreateNotFoundException
throws
NetworkCreateInternalServerErrorException
Return values
NetworksCreatePostResponse201|ResponseInterface|null

networkDisconnect()

public networkDisconnect(string $id, NetworksIdDisconnectPostBody $container[, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

Network ID or name

$container : NetworksIdDisconnectPostBody
$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
NetworkDisconnectForbiddenException
throws
NetworkDisconnectNotFoundException
throws
NetworkDisconnectInternalServerErrorException
Return values
ResponseInterface|null

networkInspect()

public networkInspect(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : Network|ResponseInterface|null
Parameters
$id : string

Network ID or name

$queryParameters : array<string|int, mixed> = []

{

@var bool $verbose Detailed inspect output for troubleshooting
@var string $scope Filter the network by scope (swarm, global, or local)

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
NetworkInspectNotFoundException
throws
NetworkInspectInternalServerErrorException
Return values
Network|ResponseInterface|null

networkList()

Returns a list of networks. For details on the format, see the.

public networkList([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, Network>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters JSON encoded value of the filters (a `map[string][]string`) to process

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
NetworkListInternalServerErrorException
Return values
array<string|int, Network>|ResponseInterface|null

networkPrune()

public networkPrune([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : NetworksPrunePostResponse200|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`).

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
NetworkPruneInternalServerErrorException
Return values
NetworksPrunePostResponse200|ResponseInterface|null

nodeDelete()

public nodeDelete(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

The ID or name of the node

$queryParameters : array<string|int, mixed> = []

{

@var bool $force Force remove a node from the swarm

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
NodeDeleteNotFoundException
throws
NodeDeleteInternalServerErrorException
throws
NodeDeleteServiceUnavailableException
Return values
ResponseInterface|null

nodeList()

public nodeList([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, Node>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
NodeListInternalServerErrorException
throws
NodeListServiceUnavailableException
Return values
array<string|int, Node>|ResponseInterface|null

nodeUpdate()

public nodeUpdate(string $id, NodeSpec $body[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

The ID of the node

$body : NodeSpec
$queryParameters : array<string|int, mixed> = []

{

@var int $version The version number of the node object being updated. This is required

to avoid conflicting writes.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
NodeUpdateBadRequestException
throws
NodeUpdateNotFoundException
throws
NodeUpdateInternalServerErrorException
throws
NodeUpdateServiceUnavailableException
Return values
ResponseInterface|null

pluginCreate()

public pluginCreate(string|resource|StreamInterface $tarContext[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$tarContext : string|resource|StreamInterface

Path to tar containing plugin rootfs and manifest

$queryParameters : array<string|int, mixed> = []

{

@var string $name The name of the plugin. The `:latest` tag is optional, and is the

default if omitted.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
PluginCreateInternalServerErrorException
Return values
ResponseInterface|null

pluginDelete()

public pluginDelete(string $name[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : Plugin|ResponseInterface|null
Parameters
$name : string

The name of the plugin. The :latest tag is optional, and is the

$queryParameters : array<string|int, mixed> = []

{

@var bool $force Disable the plugin before removing. This may result in issues if the

plugin is in use by a container.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
PluginDeleteNotFoundException
throws
PluginDeleteInternalServerErrorException
Return values
Plugin|ResponseInterface|null

pluginDisable()

public pluginDisable(string $name[, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$name : string

The name of the plugin. The :latest tag is optional, and is the

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
PluginDisableNotFoundException
throws
PluginDisableInternalServerErrorException
Return values
ResponseInterface|null

pluginEnable()

public pluginEnable(string $name[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$name : string

The name of the plugin. The :latest tag is optional, and is the

$queryParameters : array<string|int, mixed> = []

{

@var int $timeout Set the HTTP client timeout (in seconds)

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
PluginEnableNotFoundException
throws
PluginEnableInternalServerErrorException
Return values
ResponseInterface|null

pluginList()

Returns information about installed plugins.

public pluginList([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, Plugin>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters A JSON encoded value of the filters (a `map[string][]string`) to

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
PluginListInternalServerErrorException
Return values
array<string|int, Plugin>|ResponseInterface|null

pluginPull()

Pulls and installs a plugin. After the plugin is installed, it can be.

public pluginPull(array<string|int, mixed> $body[, array<string|int, mixed> $queryParameters = [] ][, array<string|int, mixed> $headerParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$body : array<string|int, mixed>
$queryParameters : array<string|int, mixed> = []

{

@var string $remote Remote reference for plugin to install.

@var string $name Local name for the pulled plugin.

The :latest tag is optional, and is used as the default if omitted.

}

$headerParameters : array<string|int, mixed> = []

{

@var string $X-Registry-Auth A base64url-encoded auth configuration to use when pulling a plugin

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
PluginPullInternalServerErrorException
Return values
ResponseInterface|null

pluginPush()

Push a plugin to the registry.

public pluginPush(string $name[, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$name : string

The name of the plugin. The :latest tag is optional, and is the

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
PluginPushNotFoundException
throws
PluginPushInternalServerErrorException
Return values
ResponseInterface|null

pluginSet()

public pluginSet(string $name, array<string|int, mixed> $body[, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$name : string

The name of the plugin. The :latest tag is optional, and is the

$body : array<string|int, mixed>
$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
PluginSetNotFoundException
throws
PluginSetInternalServerErrorException
Return values
ResponseInterface|null

pluginUpgrade()

public pluginUpgrade(string $name, array<string|int, mixed> $body[, array<string|int, mixed> $queryParameters = [] ][, array<string|int, mixed> $headerParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$name : string

The name of the plugin. The :latest tag is optional, and is the

$body : array<string|int, mixed>
$queryParameters : array<string|int, mixed> = []

{

@var string $remote Remote reference to upgrade to.

The :latest tag is optional, and is used as the default if omitted.

}

$headerParameters : array<string|int, mixed> = []

{

@var string $X-Registry-Auth A base64url-encoded auth configuration to use when pulling a plugin

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
PluginUpgradeNotFoundException
throws
PluginUpgradeInternalServerErrorException
Return values
ResponseInterface|null

putContainerArchive()

Upload a tar archive to be extracted to a path in the filesystem of container id.

public putContainerArchive(string $id, string|resource|StreamInterface $inputStream[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

ID or name of the container

$inputStream : string|resource|StreamInterface

The input stream must be a tar archive compressed with one of the

$queryParameters : array<string|int, mixed> = []

{

@var string $path path to a directory in the container to extract the archive’s contents into
@var string $noOverwriteDirNonDir If `1`, `true`, or `True` then it will be an error if unpacking the
@var string $copyUIDGID If `1`, `true`, then it will copy UID/GID maps to the dest file or

dir

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
PutContainerArchiveBadRequestException
throws
PutContainerArchiveForbiddenException
throws
PutContainerArchiveNotFoundException
throws
PutContainerArchiveInternalServerErrorException
Return values
ResponseInterface|null

secretList()

public secretList([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, Secret>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters A JSON encoded value of the filters (a `map[string][]string`) to

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
SecretListInternalServerErrorException
throws
SecretListServiceUnavailableException
Return values
array<string|int, Secret>|ResponseInterface|null

secretUpdate()

public secretUpdate(string $id, SecretSpec $body[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$id : string

The ID or name of the secret

$body : SecretSpec

The spec of the secret to update. Currently, only the Labels field

$queryParameters : array<string|int, mixed> = []

{

@var int $version The version number of the secret object being updated. This is

required to avoid conflicting writes.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
SecretUpdateBadRequestException
throws
SecretUpdateNotFoundException
throws
SecretUpdateInternalServerErrorException
throws
SecretUpdateServiceUnavailableException
Return values
ResponseInterface|null

serviceCreate()

public serviceCreate(ServicesCreatePostBody $body[, array<string|int, mixed> $headerParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ServicesCreatePostResponse201|ResponseInterface|null
Parameters
$body : ServicesCreatePostBody
$headerParameters : array<string|int, mixed> = []

{

@var string $X-Registry-Auth A base64url-encoded auth configuration for pulling from private

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ServiceCreateBadRequestException
throws
ServiceCreateForbiddenException
throws
ServiceCreateConflictException
throws
ServiceCreateInternalServerErrorException
throws
ServiceCreateServiceUnavailableException
Return values
ServicesCreatePostResponse201|ResponseInterface|null

serviceInspect()

public serviceInspect(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : Service|ResponseInterface|null
Parameters
$id : string

ID or name of service

$queryParameters : array<string|int, mixed> = []

{

@var bool $insertDefaults Fill empty fields with default values.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ServiceInspectNotFoundException
throws
ServiceInspectInternalServerErrorException
throws
ServiceInspectServiceUnavailableException
Return values
Service|ResponseInterface|null

serviceList()

public serviceList([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, Service>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters A JSON encoded value of the filters (a `map[string][]string`) to

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ServiceListInternalServerErrorException
throws
ServiceListServiceUnavailableException
Return values
array<string|int, Service>|ResponseInterface|null

serviceLogs()

Get `stdout` and `stderr` logs from a service. See also.

public serviceLogs(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null

/containers/{id}/logs.

Note*: This endpoint works only for services with the local,

Parameters
$id : string

ID or name of the service

$queryParameters : array<string|int, mixed> = []

{

@var bool $details show service context and extra details provided to logs
@var bool $follow keep connection after returning logs
@var bool $stdout Return logs from `stdout`
@var bool $stderr Return logs from `stderr`
@var int $since Only return logs since this time, as a UNIX timestamp
@var bool $timestamps Add timestamps to every log line
@var string $tail Only return this number of log lines from the end of the logs.

Specify as an integer or all to output all log lines.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ServiceLogsNotFoundException
throws
ServiceLogsInternalServerErrorException
throws
ServiceLogsServiceUnavailableException
Return values
ResponseInterface|null

serviceUpdate()

public serviceUpdate(string $id, ServicesIdUpdatePostBody $body[, array<string|int, mixed> $queryParameters = [] ][, array<string|int, mixed> $headerParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ServiceUpdateResponse|ResponseInterface|null
Parameters
$id : string

ID or name of service

$body : ServicesIdUpdatePostBody
$queryParameters : array<string|int, mixed> = []

{

@var int $version The version number of the service object being updated. This is
@var string $registryAuthFrom If the `X-Registry-Auth` header is not specified, this parameter
@var string $rollback Set to this parameter to `previous` to cause a server-side rollback

}

$headerParameters : array<string|int, mixed> = []

{

@var string $X-Registry-Auth A base64url-encoded auth configuration for pulling from private

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
ServiceUpdateBadRequestException
throws
ServiceUpdateNotFoundException
throws
ServiceUpdateInternalServerErrorException
throws
ServiceUpdateServiceUnavailableException
Return values
ServiceUpdateResponse|ResponseInterface|null

swarmLeave()

public swarmLeave([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var bool $force Force leave swarm, even if this is the last manager or that it will

break the cluster.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
SwarmLeaveInternalServerErrorException
throws
SwarmLeaveServiceUnavailableException
Return values
ResponseInterface|null

swarmUpdate()

public swarmUpdate(SwarmSpec $body[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$body : SwarmSpec
$queryParameters : array<string|int, mixed> = []

{

@var int $version The version number of the swarm object being updated. This is
@var bool $rotateWorkerToken rotate the worker join token
@var bool $rotateManagerToken rotate the manager join token
@var bool $rotateManagerUnlockKey Rotate the manager unlock key.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
SwarmUpdateBadRequestException
throws
SwarmUpdateInternalServerErrorException
throws
SwarmUpdateServiceUnavailableException
Return values
ResponseInterface|null

systemEvents()

Stream real-time events from the server.

public systemEvents([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : EventsGetResponse200|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $since show events created since this timestamp then stream new events
@var string $until show events created until this timestamp then stop streaming
@var string $filters A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
SystemEventsBadRequestException
throws
SystemEventsInternalServerErrorException
Return values
EventsGetResponse200|ResponseInterface|null

systemPing()

public systemPing([string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
SystemPingInternalServerErrorException
Return values
ResponseInterface|null

systemPingHead()

public systemPingHead([string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
SystemPingHeadInternalServerErrorException
Return values
ResponseInterface|null

taskList()

public taskList([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : array<string|int, Task>|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters A JSON encoded value of the filters (a `map[string][]string`) to

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
TaskListInternalServerErrorException
throws
TaskListServiceUnavailableException
Return values
array<string|int, Task>|ResponseInterface|null

taskLogs()

Get `stdout` and `stderr` logs from a task.

public taskLogs(string $id[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null

See also /containers/{id}/logs.

Note*: This endpoint works only for services with the local,

Parameters
$id : string

ID of the task

$queryParameters : array<string|int, mixed> = []

{

@var bool $details show task context and extra details provided to logs
@var bool $follow keep connection after returning logs
@var bool $stdout Return logs from `stdout`
@var bool $stderr Return logs from `stderr`
@var int $since Only return logs since this time, as a UNIX timestamp
@var bool $timestamps Add timestamps to every log line
@var string $tail Only return this number of log lines from the end of the logs.

Specify as an integer or all to output all log lines.

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
TaskLogsNotFoundException
throws
TaskLogsInternalServerErrorException
throws
TaskLogsServiceUnavailableException
Return values
ResponseInterface|null

volumeDelete()

Instruct the driver to remove the volume.

public volumeDelete(string $name[, array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : ResponseInterface|null
Parameters
$name : string

Volume name or ID

$queryParameters : array<string|int, mixed> = []

{

@var bool $force Force the removal of the volume

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
VolumeDeleteNotFoundException
throws
VolumeDeleteConflictException
throws
VolumeDeleteInternalServerErrorException
Return values
ResponseInterface|null

volumeList()

public volumeList([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : VolumesGetResponse200|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters JSON encoded value of the filters (a `map[string][]string`) to

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
VolumeListInternalServerErrorException
Return values
VolumesGetResponse200|ResponseInterface|null

volumePrune()

public volumePrune([array<string|int, mixed> $queryParameters = [] ][, string $fetch = self::FETCH_OBJECT ]) : VolumesPrunePostResponse200|ResponseInterface|null
Parameters
$queryParameters : array<string|int, mixed> = []

{

@var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`).

}

$fetch : string = self::FETCH_OBJECT

Fetch mode to use (can be OBJECT or RESPONSE)

Tags
throws
VolumePruneInternalServerErrorException
Return values
VolumesPrunePostResponse200|ResponseInterface|null

Search results