ImageBuild extends BaseEndpoint implements Endpoint Uses EndpointTrait
Interfaces, Classes and Traits
Table of Contents
- $body : mixed
- $headerParameters : mixed
- $queryParameters : mixed
- __construct() : mixed
- Build an image from a tar archive with a `Dockerfile` in it.
- getAuthenticationScopes() : array<string|int, mixed>
- Get security scopes of an endpoint.
- getBody() : array<string|int, mixed>
- Get body for an endpoint.
- getExtraHeaders() : array<string|int, mixed>
- getHeaders() : array<string|int, mixed>
- Get the headers of an endpoint.
- getMethod() : string
- Get the HTTP method of an endpoint (like GET, POST, ...).
- getQueryString() : string
- Get the query string of an endpoint without the starting ? (like foo=foo&bar=bar).
- getUri() : string
- Get the URI of an endpoint (like /foo-uri).
- parseResponse() : mixed
- getFormBody() : array<string|int, mixed>
- getFormOptionsResolver() : OptionsResolver
- getHeadersOptionsResolver() : OptionsResolver
- getMultipartBody() : array<string|int, mixed>
- getQueryOptionsResolver() : OptionsResolver
- getSerializedBody() : array<string|int, mixed>
- transformResponseBody() : null
Properties
$body
protected
mixed
$body
$headerParameters
protected
mixed
$headerParameters
= []
$queryParameters
protected
mixed
$queryParameters
= []
Methods
__construct()
Build an image from a tar archive with a `Dockerfile` in it.
public
__construct(string|resource|StreamInterface $inputStream[, array<string|int, mixed> $queryParameters = [] ][, array<string|int, mixed> $headerParameters = [] ]) : mixed
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.Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a
https://prefix and a/v1/suffix even though Docker will prefer to use the v2 registry API.}
Return values
mixed —getAuthenticationScopes()
Get security scopes of an endpoint.
public
getAuthenticationScopes() : array<string|int, mixed>
Return values
array<string|int, mixed> —getBody()
Get body for an endpoint.
public
getBody(SerializerInterface $serializer[, mixed $streamFactory = null ]) : array<string|int, mixed>
Return value consist of an array where the first item will be a list of headers to add on the request (like the Content Type) And the second value consist of the body object.
Parameters
- $serializer : SerializerInterface
- $streamFactory : mixed = null
Return values
array<string|int, mixed> —getExtraHeaders()
public
getExtraHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed> —getHeaders()
Get the headers of an endpoint.
public
getHeaders([array<string|int, mixed> $baseHeaders = [] ]) : array<string|int, mixed>
Parameters
- $baseHeaders : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getMethod()
Get the HTTP method of an endpoint (like GET, POST, ...).
public
getMethod() : string
Return values
string —getQueryString()
Get the query string of an endpoint without the starting ? (like foo=foo&bar=bar).
public
getQueryString() : string
Return values
string —getUri()
Get the URI of an endpoint (like /foo-uri).
public
getUri() : string
Return values
string —parseResponse()
public
parseResponse(ResponseInterface $response, SerializerInterface $serializer[, string $fetchMode = Client::FETCH_OBJECT ]) : mixed
Parameters
- $response : ResponseInterface
- $serializer : SerializerInterface
- $fetchMode : string = Client::FETCH_OBJECT
Return values
mixed —getFormBody()
protected
getFormBody() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFormOptionsResolver()
protected
getFormOptionsResolver() : OptionsResolver
Return values
OptionsResolver —getHeadersOptionsResolver()
protected
getHeadersOptionsResolver() : OptionsResolver
Return values
OptionsResolver —getMultipartBody()
protected
getMultipartBody([mixed $streamFactory = null ]) : array<string|int, mixed>
Parameters
- $streamFactory : mixed = null
Return values
array<string|int, mixed> —getQueryOptionsResolver()
protected
getQueryOptionsResolver() : OptionsResolver
Return values
OptionsResolver —getSerializedBody()
protected
getSerializedBody(SerializerInterface $serializer) : array<string|int, mixed>
Parameters
- $serializer : SerializerInterface
Return values
array<string|int, mixed> —transformResponseBody()
protected
transformResponseBody(string $body, int $status, SerializerInterface $serializer, string|null $contentType) : null
Parameters
- $body : string
- $status : int
- $serializer : SerializerInterface
- $contentType : string|null