pub struct HostConfig {
Show 70 fields pub auto_remove: Option<bool>, pub binds: Option<Vec<String, Global>>, pub blkio_device_read_bps: Option<Vec<ThrottleDevice, Global>>, pub blkio_device_read_i_ops: Option<Vec<ThrottleDevice, Global>>, pub blkio_device_write_bps: Option<Vec<ThrottleDevice, Global>>, pub blkio_device_write_i_ops: Option<Vec<ThrottleDevice, Global>>, pub blkio_weight: Option<u16>, pub blkio_weight_device: Option<Vec<WeightDevice, Global>>, pub cap_add: Option<Vec<String, Global>>, pub cap_drop: Option<Vec<String, Global>>, pub cgroup: Option<String>, pub cgroup_parent: Option<String>, pub cgroupns_mode: Option<String>, pub console_size: Option<Vec<u64, Global>>, 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, Global>>, pub device_requests: Option<Vec<DeviceRequest, Global>>, pub devices: Option<Vec<DeviceMapping, Global>>, pub dns: Option<Vec<String, Global>>, pub dns_options: Option<Vec<String, Global>>, pub dns_search: Option<Vec<String, Global>>, pub extra_hosts: Option<Vec<String, Global>>, pub group_add: Option<Vec<String, Global>>, 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, Global>>, pub log_config: Option<LogConfig>, pub masked_paths: Option<Vec<String, Global>>, pub memory: Option<i64>, pub memory_reservation: Option<i64>, pub memory_swap: Option<i64>, pub memory_swappiness: Option<i64>, pub mounts: Option<Vec<Mount, Global>>, 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, Global>>, RandomState>>, pub privileged: Option<bool>, pub publish_all_ports: Option<bool>, pub readonly_paths: Option<Vec<String, Global>>, pub readonly_rootfs: Option<bool>, pub restart_policy: Option<RestartPolicy>, pub runtime: Option<String>, pub security_opt: Option<Vec<String, Global>>, pub shm_size: Option<i64>, pub storage_opt: Option<HashMap<String, String, RandomState>>, pub sysctls: Option<HashMap<String, String, RandomState>>, pub tmpfs: Option<HashMap<String, String, RandomState>>, pub uts_mode: Option<String>, pub ulimits: Option<Vec<Ulimit, Global>>, pub userns_mode: Option<String>, pub volume_driver: Option<String>, pub volumes_from: Option<Vec<String, Global>>,
}
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, Global>>

Applicable to all platforms

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

Applicable to UNIX platforms

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

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, Global>>§device_requests: Option<Vec<DeviceRequest, Global>>§devices: Option<Vec<DeviceMapping, Global>>§dns: Option<Vec<String, Global>>§dns_options: Option<Vec<String, Global>>§dns_search: Option<Vec<String, Global>>§extra_hosts: Option<Vec<String, Global>>§group_add: Option<Vec<String, Global>>§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, Global>>§log_config: Option<LogConfig>§masked_paths: Option<Vec<String, Global>>

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, Global>>

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, Global>>, RandomState>>§privileged: Option<bool>§publish_all_ports: Option<bool>§readonly_paths: Option<Vec<String, Global>>

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, Global>>§shm_size: Option<i64>§storage_opt: Option<HashMap<String, String, RandomState>>§sysctls: Option<HashMap<String, String, RandomState>>§tmpfs: Option<HashMap<String, String, RandomState>>§uts_mode: Option<String>§ulimits: Option<Vec<Ulimit, Global>>§userns_mode: Option<String>§volume_driver: Option<String>§volumes_from: Option<Vec<String, Global>>

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
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