Struct docker_api::api::container::opts::ContainerOptsBuilder [−][src]
pub struct ContainerOptsBuilder { /* fields omitted */ }
Implementations
enable all exposed ports on the container to be mapped to random, available, ports on the host
Publish a port in the container without assigning a port on the host
Specify the working dir (corresponds to the -w
docker cli argument)
pub fn security_options<O, S>(self, security_options: O) -> Self where
O: IntoIterator<Item = S>,
S: AsRef<str> + Serialize,
pub fn security_options<O, S>(self, security_options: O) -> Self where
O: IntoIterator<Item = S>,
S: AsRef<str> + Serialize,
Specify a Vec of string values to customize labels for MLS systems, such as SELinux.
Specify any bind mounts, taking the form of /some/host/path:/some/container/path
pub fn links<L, S>(self, links: L) -> Self where
L: IntoIterator<Item = S>,
S: AsRef<str> + Serialize,
Total memory limit (memory + swap) in bytes. Set to -1 (default) to enable unlimited swap.
CPU quota in units of 10-9 CPUs. Set to 0 (default) for there to be no limit.
For example, setting nano_cpus
to 500_000_000
results in the container being allocated
50% of a single CPU, while 2_000_000_000
results in the container being allocated 2 CPUs.
CPU quota in units of CPUs. This is a wrapper around nano_cpus
to do the unit conversion.
See nano_cpus
.
Sets an integer value representing the container’s relative CPU weight versus other containers.
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,
Whether to attach to stdin
.
Whether to attach to stdout
.
Whether to attach to stderr
.
pub fn extra_hosts<H, S>(self, extra_hosts: H) -> Self where
H: IntoIterator<Item = S>,
S: AsRef<str> + Serialize,
pub fn volumes_from<V, S>(self, volumes_from: V) -> Self where
V: IntoIterator<Item = S>,
S: AsRef<str> + Serialize,
pub fn env<E, S>(self, env: E) -> Self where
E: IntoIterator<Item = S>,
S: AsRef<str> + Serialize,
pub fn cmd<C, S>(self, cmd: C) -> Self where
C: IntoIterator<Item = S>,
S: AsRef<str> + Serialize,
pub fn entrypoint<E, S>(self, entrypoint: E) -> Self where
E: IntoIterator<Item = S>,
S: AsRef<str> + Serialize,
pub fn capabilities<C, S>(self, capabilities: C) -> Self where
C: IntoIterator<Item = S>,
S: AsRef<str> + Serialize,
Signal to stop a container as a string. Default is "SIGTERM"
Signal to stop a container as an integer. Default is 15 (SIGTERM).
Timeout to stop a container. Only seconds are counted. Default is 10s
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ContainerOptsBuilder
impl Send for ContainerOptsBuilder
impl Sync for ContainerOptsBuilder
impl Unpin for ContainerOptsBuilder
impl UnwindSafe for ContainerOptsBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
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