pub struct ImageBuildOptsBuilder { /* private fields */ }
Implementations§
Source§impl ImageBuildOptsBuilder
impl ImageBuildOptsBuilder
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
pub fn labels<K, V>(self, labels: impl IntoIterator<Item = (K, V)>) -> Self
Add labels to this image.
pub fn build(&self) -> ImageBuildOpts
Trait Implementations§
Source§impl Default for ImageBuildOptsBuilder
impl Default for ImageBuildOptsBuilder
Source§fn default() -> ImageBuildOptsBuilder
fn default() -> ImageBuildOptsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ImageBuildOptsBuilder
impl RefUnwindSafe for ImageBuildOptsBuilder
impl Send for ImageBuildOptsBuilder
impl Sync for ImageBuildOptsBuilder
impl Unpin for ImageBuildOptsBuilder
impl UnwindSafe for ImageBuildOptsBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more