Struct HostConfig

Source
pub struct HostConfig {
Show 70 fields pub auto_remove: Option<bool>, pub binds: Option<Vec<String>>, pub blkio_device_read_bps: Option<Vec<ThrottleDevice>>, pub blkio_device_read_i_ops: Option<Vec<ThrottleDevice>>, pub blkio_device_write_bps: Option<Vec<ThrottleDevice>>, pub blkio_device_write_i_ops: Option<Vec<ThrottleDevice>>, pub blkio_weight: Option<u16>, pub blkio_weight_device: Option<Vec<WeightDevice>>, pub cap_add: Option<Vec<String>>, pub cap_drop: Option<Vec<String>>, pub cgroup: Option<String>, pub cgroup_parent: Option<String>, pub cgroupns_mode: Option<String>, pub console_size: Option<Vec<u64>>, pub container_id_file: Option<String>, pub cpu_count: Option<i64>, pub cpu_percent: Option<i64>, pub cpu_period: Option<i64>, pub cpu_quota: Option<i64>, pub cpu_realtime_period: Option<i64>, pub cpu_realtime_runtime: Option<i64>, pub cpu_shares: Option<i64>, pub cpuset_cpus: Option<String>, pub cpuset_mems: Option<String>, pub device_cgroup_rules: Option<Vec<String>>, pub device_requests: Option<Vec<DeviceRequest>>, pub devices: Option<Vec<DeviceMapping>>, pub dns: Option<Vec<String>>, pub dns_options: Option<Vec<String>>, pub dns_search: Option<Vec<String>>, pub extra_hosts: Option<Vec<String>>, pub group_add: Option<Vec<String>>, pub io_maximum_bandwidth: Option<u64>, pub io_maximum_i_ops: Option<u64>, pub init: Option<bool>, pub ipc_mode: Option<String>, pub isolation: Option<String>, pub kernel_memory: Option<i64>, pub kernel_memory_tcp: Option<i64>, pub links: Option<Vec<String>>, pub log_config: Option<LogConfig>, pub masked_paths: Option<Vec<String>>, pub memory: Option<i64>, pub memory_reservation: Option<i64>, pub memory_swap: Option<i64>, pub memory_swappiness: Option<i64>, pub mounts: Option<Vec<Mount>>, pub nano_cpus: Option<i64>, pub network_mode: Option<String>, pub oom_kill_disable: Option<bool>, pub oom_score_adj: Option<i64>, pub pid_mode: Option<String>, pub pids_limit: Option<i64>, pub port_bindings: Option<HashMap<String, Option<Vec<PortBinding>>>>, pub privileged: Option<bool>, pub publish_all_ports: Option<bool>, pub readonly_paths: Option<Vec<String>>, pub readonly_rootfs: Option<bool>, pub restart_policy: Option<RestartPolicy>, pub runtime: Option<String>, pub security_opt: Option<Vec<String>>, pub shm_size: Option<i64>, pub storage_opt: Option<HashMap<String, String>>, pub sysctls: Option<HashMap<String, String>>, pub tmpfs: Option<HashMap<String, String>>, pub uts_mode: Option<String>, pub ulimits: Option<Vec<Ulimit>>, pub userns_mode: Option<String>, pub volume_driver: Option<String>, pub volumes_from: Option<Vec<String>>,
}
Expand description

Here, “non-portable” means “dependent of the host we are running on”. Portable information should appear in Config.

Fields§

§auto_remove: Option<bool>§binds: Option<Vec<String>>

Applicable to all platforms

§blkio_device_read_bps: Option<Vec<ThrottleDevice>>§blkio_device_read_i_ops: Option<Vec<ThrottleDevice>>§blkio_device_write_bps: Option<Vec<ThrottleDevice>>§blkio_device_write_i_ops: Option<Vec<ThrottleDevice>>§blkio_weight: Option<u16>§blkio_weight_device: Option<Vec<WeightDevice>>§cap_add: Option<Vec<String>>§cap_drop: Option<Vec<String>>§cgroup: Option<String>§cgroup_parent: Option<String>

Applicable to UNIX platforms

§cgroupns_mode: Option<String>§console_size: Option<Vec<u64>>

Applicable to Windows

§container_id_file: Option<String>§cpu_count: Option<i64>

Applicable to Windows

§cpu_percent: Option<i64>§cpu_period: Option<i64>§cpu_quota: Option<i64>§cpu_realtime_period: Option<i64>§cpu_realtime_runtime: Option<i64>§cpu_shares: Option<i64>

Applicable to all platforms

§cpuset_cpus: Option<String>§cpuset_mems: Option<String>§device_cgroup_rules: Option<Vec<String>>§device_requests: Option<Vec<DeviceRequest>>§devices: Option<Vec<DeviceMapping>>§dns: Option<Vec<String>>§dns_options: Option<Vec<String>>§dns_search: Option<Vec<String>>§extra_hosts: Option<Vec<String>>§group_add: Option<Vec<String>>§io_maximum_bandwidth: Option<u64>§io_maximum_i_ops: Option<u64>§init: Option<bool>

Run a custom init inside the container, if null, use the daemon’s configured settings

§ipc_mode: Option<String>§isolation: Option<String>§kernel_memory: Option<i64>§kernel_memory_tcp: Option<i64>§links: Option<Vec<String>>§log_config: Option<LogConfig>§masked_paths: Option<Vec<String>>

MaskedPaths is the list of paths to be masked inside the container (this overrides the default set of paths)

§memory: Option<i64>§memory_reservation: Option<i64>§memory_swap: Option<i64>§memory_swappiness: Option<i64>§mounts: Option<Vec<Mount>>

Mounts specs used by the container

§nano_cpus: Option<i64>§network_mode: Option<String>§oom_kill_disable: Option<bool>§oom_score_adj: Option<i64>§pid_mode: Option<String>§pids_limit: Option<i64>§port_bindings: Option<HashMap<String, Option<Vec<PortBinding>>>>§privileged: Option<bool>§publish_all_ports: Option<bool>§readonly_paths: Option<Vec<String>>

ReadonlyPaths is the list of paths to be set as read-only inside the container (this overrides the default set of paths)

§readonly_rootfs: Option<bool>§restart_policy: Option<RestartPolicy>§runtime: Option<String>§security_opt: Option<Vec<String>>§shm_size: Option<i64>§storage_opt: Option<HashMap<String, String>>§sysctls: Option<HashMap<String, String>>§tmpfs: Option<HashMap<String, String>>§uts_mode: Option<String>§ulimits: Option<Vec<Ulimit>>§userns_mode: Option<String>§volume_driver: Option<String>§volumes_from: Option<Vec<String>>

Trait Implementations§

Source§

impl Clone for HostConfig

Source§

fn clone(&self) -> HostConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HostConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for HostConfig

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<HostConfig, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for HostConfig

Source§

fn eq(&self, other: &HostConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for HostConfig

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for HostConfig

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

impl<T> MaybeSendSync for T