Skip to main content

Interface: BuildImageOptions

Properties

abortController?

optional abortController: AbortController

The abort controller for running the build image operation

Defined in

packages/extension-api/src/extension-api.d.ts:3211


buildargs?

optional buildargs: object

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 Dockerfilev instructions. This is not meant for passing secret values. For example, the build arg FOO=bar would become {"FOO":"bar"} in JSON. This would result in the query parameter buildargs={"FOO":"bar"}. Note that {"FOO":"bar"} should be URI component encoded.

Index Signature

[key: string]: string

Defined in

packages/extension-api/src/extension-api.d.ts:3295


cachefrom?

optional cachefrom: string

JSON array of images used for build cache resolution.

Defined in

packages/extension-api/src/extension-api.d.ts:3237


containerFile?

optional containerFile: string

Specifies a Containerfile which contains instructions for building the image

Defined in

packages/extension-api/src/extension-api.d.ts:3191


cpuperiod?

optional cpuperiod: number

The length of a CPU period in microseconds.

Defined in

packages/extension-api/src/extension-api.d.ts:3281


cpuquota?

optional cpuquota: number

Microseconds of CPU time that the container can get in a CPU period.

Defined in

packages/extension-api/src/extension-api.d.ts:3286


cpusetcpus?

optional cpusetcpus: number

CPUs in which to allow execution (e.g., 0-3, 0,1).

Defined in

packages/extension-api/src/extension-api.d.ts:3276


cpushares?

optional cpushares: number

CPU shares (relative weight).

Defined in

packages/extension-api/src/extension-api.d.ts:3271


extrahosts?

optional extrahosts: string

Extra hosts to add to /etc/hosts

Defined in

packages/extension-api/src/extension-api.d.ts:3216


forcerm?

optional forcerm: boolean

Default: false

Always remove intermediate containers, even upon failure.

Defined in

packages/extension-api/src/extension-api.d.ts:3256


labels?

optional labels: object

Arbitrary key/value labels to set on the image, as a JSON map of string pairs.

Index Signature

[key: string]: string

Defined in

packages/extension-api/src/extension-api.d.ts:3310


memory?

optional memory: number

Set memory limit for build.

Defined in

packages/extension-api/src/extension-api.d.ts:3261


memswap?

optional memswap: number

Total memory (memory + swap). Set as -1 to disable swap.

Defined in

packages/extension-api/src/extension-api.d.ts:3266


networkmode?

optional networkmode: string

Sets the networking mode for the run commands during build. Supported standard values are: bridge, host, none, and container:<name|id>. Any other value is taken as a custom network's name or ID to which this container should connect to.

Defined in

packages/extension-api/src/extension-api.d.ts:3317


nocache?

optional nocache: boolean

Default: false

Do not use the cache when building the image.

Defined in

packages/extension-api/src/extension-api.d.ts:3338


outputs?

optional outputs: string

Default: ""

BuildKit output configuration

Defined in

packages/extension-api/src/extension-api.d.ts:3331


platform?

optional platform: string

Set the os/arch of the built image (and its base image, when using one) to the provided value instead of using the current operating system and architecture of the host

Defined in

packages/extension-api/src/extension-api.d.ts:3201


provider?

optional provider: ContainerProviderConnection

Set the provider to use, if not we will try select the first one available (sorted in favor of Podman)

Defined in

packages/extension-api/src/extension-api.d.ts:3206


pull?

optional pull: string

Attempt to pull the image even if an older image exists locally.

Defined in

packages/extension-api/src/extension-api.d.ts:3242


q?

optional q: boolean

Default: false

Suppress verbose build output.

Defined in

packages/extension-api/src/extension-api.d.ts:3232


remote?

optional remote: string

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.

Defined in

packages/extension-api/src/extension-api.d.ts:3225


rm?

optional rm: boolean

Default: true

Remove intermediate containers after a successful build.

Defined in

packages/extension-api/src/extension-api.d.ts:3249


shmsize?

optional shmsize: number

Size of /dev/shm in bytes. The size must be greater than 0. If omitted the system uses 64MB.

Defined in

packages/extension-api/src/extension-api.d.ts:3300


squash?

optional squash: boolean

Squash the resulting images layers into a single layer.

Defined in

packages/extension-api/src/extension-api.d.ts:3305


tag?

optional tag: string

Specifies the name which is assigned to the resulting image if the build process completes successfully

Defined in

packages/extension-api/src/extension-api.d.ts:3196


target?

optional target: string

Default: ""

Target build stage

Defined in

packages/extension-api/src/extension-api.d.ts:3324