class Client

Image.

Constants

TYPE

BASE_URL

Methods

__construct(Curl $curl, $docker_host)

No description

mixed
list(bool $all = false, array $filters = null, bool $digests = false)

No description

mixed
build(string|null $gitAddress, string|null $auth, string $tag, int|null $shmsize, string $dockerfile = 'Dockerfile', string $extrahosts = null, bool $q = false, bool $nocache = false, string $cachefrom = null, string $pull = null, bool $rm = true, bool $forcerm = false, array $buildargs = null, bool $squash = false, array $labels = null, string $networkmode = null, string $platform = null, string|null $request = null)

No description

mixed
deleteBuildCache()

No description

array
parseImage(string $image, string $tag = 'latest')

No description

mixed
pull(string $image, string $tag = 'latest', bool $force = false, string $auth = null, string $platform = null)

如果 tag 为空,则拉取所有标签,所以必须指定名称 额外增加 $force 参数,拉取前首先判断是否已存在。

mixed
import(string $fromSrc, string $repo = null, string $auth = null, string $platform = null, string $request = null)

No description

mixed
inspect(string $name)

No description

mixed
history(string $name)

No description

mixed
push(string $image, string $tag = 'latest', string $auth = null)

No description

mixed
tag(string $name, string $repo, string $tag = 'latest')

No description

mixed
remove(string $name, bool $force = false, bool $noprune = false)

No description

mixed
search(string $term, int $limit = null, array $filters = [])

No description

mixed
prune(array $filters = [])

No description

mixed
commit(string $container, string $repo, string $tag, string $comment, string $author, bool $pause, string $changes, array $request_body)

Create a new image from a container.

mixed
export(string $name)

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

mixed
exports(array $names)

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

mixed
load(string $tar, bool $quiet = false)

Load a set of images and tags into a repository.

Details

at line 66
__construct(Curl $curl, $docker_host)

Parameters

Curl $curl
$docker_host

at line 120
mixed list(bool $all = false, array $filters = null, bool $digests = false)

Parameters

bool $all
array $filters
bool $digests

Return Value

mixed 200

Exceptions

Exception

at line 155
mixed build(string|null $gitAddress, string|null $auth, string $tag, int|null $shmsize, string $dockerfile = 'Dockerfile', string $extrahosts = null, bool $q = false, bool $nocache = false, string $cachefrom = null, string $pull = null, bool $rm = true, bool $forcerm = false, array $buildargs = null, bool $squash = false, array $labels = null, string $networkmode = null, string $platform = null, string|null $request = null)

Parameters

string|null $gitAddress
string|null $auth
string $tag
int|null $shmsize
string $dockerfile
string $extrahosts
bool $q
bool $nocache
string $cachefrom
string $pull
bool $rm
bool $forcerm
array $buildargs
bool $squash
array $labels
string $networkmode
string $platform
string|null $request

Return Value

mixed 200

Exceptions

Exception

at line 213
mixed deleteBuildCache()

Return Value

mixed 200

Exceptions

Exception

at line 247
array parseImage(string $image, string $tag = 'latest')

Parameters

string $image
string $tag 当 $image 不包含 tag 时的默认值

Return Value

array

at line 282
mixed pull(string $image, string $tag = 'latest', bool $force = false, string $auth = null, string $platform = null)

如果 tag 为空,则拉取所有标签,所以必须指定名称 额外增加 $force 参数,拉取前首先判断是否已存在。

Parameters

string $image
string $tag
bool $force
string $auth
string $platform

Return Value

mixed 200

Exceptions

Exception

at line 306
mixed import(string $fromSrc, string $repo = null, string $auth = null, string $platform = null, string $request = null)

Parameters

string $fromSrc
string $repo
string $auth
string $platform
string $request

Return Value

mixed 200

Exceptions

Exception

at line 330
mixed inspect(string $name)

Parameters

string $name

Return Value

mixed 200

Exceptions

Exception

at line 342
mixed history(string $name)

Parameters

string $name

Return Value

mixed 200

Exceptions

Exception

at line 356
mixed push(string $image, string $tag = 'latest', string $auth = null)

Parameters

string $image
string $tag
string $auth

Return Value

mixed 200

Exceptions

Exception

at line 378
mixed tag(string $name, string $repo, string $tag = 'latest')

Parameters

string $name
string $repo
string $tag

Return Value

mixed 201

Exceptions

Exception

at line 395
mixed remove(string $name, bool $force = false, bool $noprune = false)

Parameters

string $name
bool $force
bool $noprune

Return Value

mixed 200

Exceptions

Exception

Parameters

string $term
int $limit
array $filters

Return Value

mixed 200

Exceptions

Exception

at line 446
mixed prune(array $filters = [])

Parameters

array $filters

Return Value

mixed 200

Exceptions

Exception

at line 469
mixed commit(string $container, string $repo, string $tag, string $comment, string $author, bool $pause, string $changes, array $request_body)

Create a new image from a container.

Parameters

string $container
string $repo
string $tag
string $comment
string $author
bool $pause
string $changes
array $request_body

Return Value

mixed 201

Exceptions

Exception

See also

https://docs.docker.com/engine/api/v1.37/#operation/ImageCommit

at line 502
mixed export(string $name)

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

Parameters

string $name

Return Value

mixed 200

Exceptions

Exception

at line 516
mixed exports(array $names)

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

Parameters

array $names

Return Value

mixed 200

Exceptions

Exception

at line 530
mixed load(string $tar, bool $quiet = false)

Load a set of images and tags into a repository.

Parameters

string $tar
bool $quiet

Return Value

mixed 200

Exceptions

Exception