Struct docker_api::opts::BuildOptsBuilder
source · [−]pub struct BuildOptsBuilder { /* private fields */ }
Implementations
sourceimpl BuildOptsBuilder
impl BuildOptsBuilder
sourcepub fn dockerfile(self, dockerfile: impl Into<String>) -> Self
pub fn dockerfile(self, dockerfile: impl Into<String>) -> Self
Set the name of the docker file. defaults to DockerFile
.
sourcepub fn extra_hosts(self, extra_hosts: impl Into<String>) -> Self
pub fn extra_hosts(self, extra_hosts: impl Into<String>) -> Self
Extra hosts to add to /etc/hosts.
pub fn remote(self, remote: impl Into<String>) -> Self
sourcepub fn pull(self, pull: impl Into<String>) -> Self
pub fn pull(self, pull: impl Into<String>) -> Self
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(self, cpu_set_cpus: impl Into<String>) -> Self
pub fn cpu_set_cpus(self, cpu_set_cpus: impl Into<String>) -> Self
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(self, network_mode: impl Into<String>) -> Self
pub fn network_mode(self, network_mode: impl Into<String>) -> Self
bridge,
host,
none,
container:<name|id>`, or a custom network name.
sourcepub fn platform(self, platform: impl Into<String>) -> Self
pub fn platform(self, platform: impl Into<String>) -> Self
Platform in the format os[/arch[/variant]].
sourcepub fn labels<K, V>(self, labels: impl IntoIterator<Item = (K, V)>) -> Self where
K: Serialize + Eq + Hash,
V: Serialize,
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.
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