pub struct ImageBuildOptsBuilder { /* private fields */ }
Expand description

A builder struct for ImageBuildOpts.

Implementations§

A builder struct for ImageBuildOpts.

Parameters:

  • path - Path to a build context directory

Finish building ImageBuildOpts.

Instead of building for a set of platforms specified using the platform option, inspect the build’s base images, and build for all of the platforms that are available. Stages that use scratch as a starting point can not be inspected, so at least one non-scratch stage must be present for detection to work usefully.

Key-value build time variables.

List of images used to build cache resolution

Limits the CPU CFS (Completely Fair Scheduler) period.

Limits the CPU CFS (Completely Fair Scheduler) quota.

Set CPUs in which to allow execution. Example: 0-1, 1-3

CPU shares - relative weights

Path within the build context to the Dockerfile. This is ignored if remote is specified and points to an external Dockerfile.

Extra hosts to add to /etc/hosts.

Always remove intermediate containers, even upon failure.

Inject http proxy environment variables into container.

Key-value pairs to set as labels on the new image.

Cache intermediate layers during build.

The upper limit (in bytes) on how much memory running containers can use.

Limits the amount of memory and swap together.

Set the networking mode for the run commands during build.

Do not use the cache when building the image.

Output configuration.

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

Suppress verbose build output.

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.

Remove intermediate containers after a successful build.

Value to use when mounting an shmfs on the container’s /dev/shm directory. Default is 64MB

Silently ignored. Squash the resulting images layers into a single layer.

A name and optional tag to apply to the image in the name:tag format.

Target build stage

Unset environment variables from the final image.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more