Struct ImageBuildOptsBuilder

Source
pub struct ImageBuildOptsBuilder { /* private fields */ }

Implementations§

Source§

impl ImageBuildOptsBuilder

Source

pub fn dockerfile(self, dockerfile: impl Into<String>) -> Self

Set the name of the docker file. defaults to DockerFile.

Source

pub fn tag(self, tag: impl Into<String>) -> Self

Tag this image with a name after building it.

Source

pub fn extra_hosts(self, extra_hosts: impl Into<String>) -> Self

Extra hosts to add to /etc/hosts.

Source

pub fn remote(self, remote: impl Into<String>) -> Self

Source

pub fn quiet(self, quiet: bool) -> Self

Suppress verbose build output.

Source

pub fn nocahe(self, nocahe: bool) -> Self

Don’t use the image cache when building image.

Source

pub fn pull(self, pull: impl Into<String>) -> Self

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

Source

pub fn rm(self, rm: bool) -> Self

Source

pub fn forcerm(self, forcerm: bool) -> Self

Source

pub fn memory(self, memory: usize) -> Self

Set memory limit for build.

Source

pub fn memswap(self, memswap: usize) -> Self

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

Source

pub fn cpu_shares(self, cpu_shares: usize) -> Self

CPU shares (relative weight).

Source

pub fn cpu_set_cpus(self, cpu_set_cpus: impl Into<String>) -> Self

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

Source

pub fn cpu_period(self, cpu_period: usize) -> Self

The length of a CPU period in microseconds.

Source

pub fn cpu_quota(self, cpu_quota: usize) -> Self

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

Source

pub fn shm_size(self, shm_size: usize) -> Self

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

Source

pub fn squash(self, squash: bool) -> Self

Squash the resulting images layers into a single layer. (Experimental release only.)

Source

pub fn network_mode(self, network_mode: impl Into<String>) -> Self

bridge, host, none, container:<name|id>`, or a custom network name.

Source

pub fn platform(self, platform: impl Into<String>) -> Self

Platform in the format os[/arch[/variant]].

Source

pub fn target(self, target: impl Into<String>) -> Self

Target build stage.

Source

pub fn outputs(self, outputs: impl Into<String>) -> Self

BuildKit output configuration.

Source

pub fn labels<K, V>(self, labels: impl IntoIterator<Item = (K, V)>) -> Self
where K: Serialize + Eq + Hash, V: Serialize,

Add labels to this image.

Source

pub fn build(&self) -> ImageBuildOpts

Trait Implementations§

Source§

impl Default for ImageBuildOptsBuilder

Source§

fn default() -> ImageBuildOptsBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T