Struct docker_api::api::image::opts::BuildOptsBuilder
source · [−]pub struct BuildOptsBuilder { /* private fields */ }
Implementations
sourceimpl BuildOptsBuilder
impl BuildOptsBuilder
sourcepub fn dockerfile<P>(self, dockerfile: P) -> Self where
P: Into<String>,
pub fn dockerfile<P>(self, dockerfile: P) -> Self where
P: Into<String>,
Set the name of the docker file. defaults to DockerFile
.
sourcepub fn tag<T>(self, tag: T) -> Self where
T: Into<String>,
pub fn tag<T>(self, tag: T) -> Self where
T: Into<String>,
Tag this image with a name after building it.
sourcepub fn extra_hosts<H>(self, extra_hosts: H) -> Self where
H: Into<String>,
pub fn extra_hosts<H>(self, extra_hosts: H) -> Self where
H: Into<String>,
Extra hosts to add to /etc/hosts.
pub fn remote<R>(self, remote: R) -> Self where
R: Into<String>,
sourcepub fn pull<I>(self, pull: I) -> Self where
I: Into<String>,
pub fn pull<I>(self, pull: I) -> Self where
I: Into<String>,
Attempt to pull the image even if an older image exists locally.
pub fn rm(self, rm: bool) -> Self
pub fn forcerm(self, forcerm: bool) -> Self
sourcepub fn memswap(self, memswap: usize) -> Self
pub fn memswap(self, memswap: usize) -> Self
Total memory (memory + swap). Set as -1 to disable swap.
CPU shares (relative weight).
sourcepub fn cpu_set_cpus<C>(self, cpu_set_cpus: C) -> Self where
C: Into<String>,
pub fn cpu_set_cpus<C>(self, cpu_set_cpus: C) -> Self where
C: Into<String>,
CPUs in which to allow execution (eg. 0-3
, 0,1
)
sourcepub fn cpu_period(self, cpu_period: usize) -> Self
pub fn cpu_period(self, cpu_period: usize) -> Self
The length of a CPU period in microseconds.
sourcepub fn cpu_quota(self, cpu_quota: usize) -> Self
pub fn cpu_quota(self, cpu_quota: usize) -> Self
Microseconds of CPU time that the container can get in a CPU period.
sourcepub fn shm_size(self, shm_size: usize) -> Self
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.
sourcepub fn squash(self, squash: bool) -> Self
pub fn squash(self, squash: bool) -> Self
Squash the resulting images layers into a single layer. (Experimental release only.)
sourcepub fn network_mode<M>(self, network_mode: M) -> Self where
M: Into<String>,
pub fn network_mode<M>(self, network_mode: M) -> Self where
M: Into<String>,
bridge,
host,
none,
container:<name|id>`, or a custom network name.
sourcepub fn platform<P>(self, platform: P) -> Self where
P: Into<String>,
pub fn platform<P>(self, platform: P) -> Self where
P: Into<String>,
Platform in the format os[/arch[/variant]].
sourcepub fn outputs<C>(self, outputs: C) -> Self where
C: Into<String>,
pub fn outputs<C>(self, outputs: C) -> Self where
C: Into<String>,
BuildKit output configuration.
sourcepub fn labels<L, K, V>(self, labels: L) -> Self where
L: IntoIterator<Item = (K, V)>,
K: AsRef<str> + Serialize + Eq + Hash,
V: AsRef<str> + Serialize,
pub fn labels<L, K, V>(self, labels: L) -> Self where
L: IntoIterator<Item = (K, V)>,
K: AsRef<str> + Serialize + Eq + Hash,
V: AsRef<str> + Serialize,
Add labels to this image.
pub fn build(&self) -> BuildOpts
Trait Implementations
sourceimpl Default for BuildOptsBuilder
impl Default for BuildOptsBuilder
sourcefn default() -> BuildOptsBuilder
fn default() -> BuildOptsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for BuildOptsBuilder
impl Send for BuildOptsBuilder
impl Sync for BuildOptsBuilder
impl Unpin for BuildOptsBuilder
impl UnwindSafe for BuildOptsBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more