Struct InspectContainerHostConfig

Source
pub struct InspectContainerHostConfig {
Show 67 fields pub auto_remove: Option<bool>, pub binds: Option<Vec<String>>, pub blkio_device_read_bps: Option<Vec<InspectBlkioThrottleDevice>>, pub blkio_device_read_i_ops: Option<Vec<InspectBlkioThrottleDevice>>, pub blkio_device_write_bps: Option<Vec<InspectBlkioThrottleDevice>>, pub blkio_device_write_i_ops: Option<Vec<InspectBlkioThrottleDevice>>, pub blkio_weight: Option<u16>, pub blkio_weight_device: Option<Vec<InspectBlkioWeightDevice>>, pub cap_add: Option<Vec<String>>, pub cap_drop: Option<Vec<String>>, pub cgroup: Option<String>, pub cgroup_conf: Option<HashMap<String, String>>, pub cgroup_manager: Option<String>, pub cgroup_mode: Option<String>, pub cgroup_parent: Option<String>, pub cgroups: Option<String>, pub console_size: Option<Vec<u64>>, pub container_id_file: Option<String>, pub cpu_count: Option<u64>, pub cpu_percent: Option<u64>, pub cpu_period: Option<u64>, pub cpu_quota: Option<i64>, pub cpu_realtime_period: Option<u64>, pub cpu_realtime_runtime: Option<i64>, pub cpu_shares: Option<u64>, pub cpuset_cpus: Option<String>, pub cpuset_mems: Option<String>, pub devices: Option<Vec<InspectDevice>>, pub disk_quota: Option<u64>, 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 id_mappings: Option<InspectIdMappings>, 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 links: Option<Vec<String>>, pub log_config: Option<InspectLogConfig>, pub memory: Option<i64>, pub memory_reservation: Option<i64>, pub memory_swap: Option<i64>, pub memory_swappiness: Option<i64>, 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<InspectHostPort>>>>, pub privileged: Option<bool>, pub publish_all_ports: Option<bool>, pub readonly_rootfs: Option<bool>, pub restart_policy: Option<InspectRestartPolicy>, pub runtime: Option<String>, pub security_opt: Option<Vec<String>>, pub shm_size: Option<i64>, pub tmpfs: Option<HashMap<String, String>>, pub uts_mode: Option<String>, pub ulimits: Option<Vec<InspectUlimit>>, pub userns_mode: Option<String>, pub volume_driver: Option<String>, pub volumes_from: Option<Vec<String>>,
}
Expand description

nolint:revive,stylecheck // Field names are fixed for compatibility and cannot be changed.

Fields§

§auto_remove: Option<bool>

AutoRemove is whether the container will be automatically removed on exiting. It is not handled directly within libpod and is stored in an annotation.

§binds: Option<Vec<String>>

Binds contains an array of user-added mounts. Both volume mounts and named volumes are included. Tmpfs mounts are NOT included. In ‘docker inspect’ this is separated into ‘Binds’ and ‘Mounts’ based on how a mount was added. We do not make this distinction and do not include a Mounts field in inspect. Format: :[:]

§blkio_device_read_bps: Option<Vec<InspectBlkioThrottleDevice>>

BlkioDeviceReadBps is an array of I/O throttle parameters for individual device nodes. This specifically sets read rate cap in bytes per second for device nodes. As with BlkioWeightDevice, we pull the path from /sys/dev, and we don’t guarantee the path will be identical to the original (though the node will be).

§blkio_device_read_i_ops: Option<Vec<InspectBlkioThrottleDevice>>

BlkioDeviceReadIOps is an array of I/O throttle parameters for individual device nodes. This specifically sets the read rate cap in iops per second for device nodes. As with BlkioWeightDevice, we pull the path from /sys/dev, and we don’t guarantee the path will be identical to the original (though the node will be).

§blkio_device_write_bps: Option<Vec<InspectBlkioThrottleDevice>>

BlkioDeviceWriteBps is an array of I/O throttle parameters for individual device nodes. this specifically sets write rate cap in bytes per second for device nodes. as with BlkioWeightDevice, we pull the path from /sys/dev, and we don’t guarantee the path will be identical to the original (though the node will be).

§blkio_device_write_i_ops: Option<Vec<InspectBlkioThrottleDevice>>

BlkioDeviceWriteIOps is an array of I/O throttle parameters for individual device nodes. This specifically sets the write rate cap in iops per second for device nodes. As with BlkioWeightDevice, we pull the path from /sys/dev, and we don’t guarantee the path will be identical to the original (though the node will be).

§blkio_weight: Option<u16>

BlkioWeight indicates the I/O resources allocated to the container. It is a relative weight in the scheduler for assigning I/O time versus other Cgroups.

§blkio_weight_device: Option<Vec<InspectBlkioWeightDevice>>

BlkioWeightDevice is an array of I/O resource priorities for individual device nodes. Unfortunately, the spec only stores the device’s Major/Minor numbers and not the path, which is used here. Fortunately, the kernel provides an interface for retrieving the path of a given node by major:minor at /sys/dev/. However, the exact path in use may not be what was used in the original CLI invocation - though it is guaranteed that the device node will be the same, and using the given path will be functionally identical.

§cap_add: Option<Vec<String>>

CapAdd is a list of capabilities added to the container. It is not directly stored by Libpod, and instead computed from the capabilities listed in the container’s spec, compared against a set of default capabilities.

§cap_drop: Option<Vec<String>>

CapDrop is a list of capabilities removed from the container. It is not directly stored by libpod, and instead computed from the capabilities listed in the container’s spec, compared against a set of default capabilities.

§cgroup: Option<String>

Cgroup contains the container’s cgroup. It is presently not populated. TODO.

§cgroup_conf: Option<HashMap<String, String>>

CgroupConf is the configuration for cgroup v2.

§cgroup_manager: Option<String>

CgroupManager is the cgroup manager used by the container. At present, allowed values are either “cgroupfs” or “systemd”.

§cgroup_mode: Option<String>

CgroupMode is the configuration of the container’s cgroup namespace. Populated as follows: private - a cgroup namespace has been created host - No cgroup namespace created container: - Using another container’s cgroup namespace ns: - A path to a cgroup namespace has been specified

§cgroup_parent: Option<String>

CgroupParent is the Cgroup parent of the container. Only set if not default.

§cgroups: Option<String>

Cgroups contains the container’s Cgroup mode. Allowed values are “default” (container is creating Cgroups) and “disabled” (container is not creating Cgroups). This is Libpod-specific and not included in docker inspect.

§console_size: Option<Vec<u64>>

ConsoleSize is an array of 2 integers showing the size of the container’s console. It is only set if the container is creating a terminal. TODO.

§container_id_file: Option<String>

ContainerIDFile is a file created during container creation to hold the ID of the created container. This is not handled within libpod and is stored in an annotation.

§cpu_count: Option<u64>

CpuCount is Windows-only and not presently implemented.

§cpu_percent: Option<u64>

CpuPercent is Windows-only and not presently implemented.

§cpu_period: Option<u64>

CpuPeriod is the length of a CPU period in microseconds. It relates directly to CpuQuota.

§cpu_quota: Option<i64>

CpuPeriod is the amount of time (in microseconds) that a container can use the CPU in every CpuPeriod.

§cpu_realtime_period: Option<u64>

CpuRealtimePeriod is the length of time (in microseconds) of the CPU realtime period. If set to 0, no time will be allocated to realtime tasks.

§cpu_realtime_runtime: Option<i64>

CpuRealtimeRuntime is the length of time (in microseconds) allocated for realtime tasks within every CpuRealtimePeriod.

§cpu_shares: Option<u64>

CpuShares indicates the CPU resources allocated to the container. It is a relative weight in the scheduler for assigning CPU time versus other Cgroups.

§cpuset_cpus: Option<String>

CpusetCpus is the set of CPUs that the container will execute on. Formatted as 0-3 or 0,2. Default (if unset) is all CPUs.

§cpuset_mems: Option<String>

CpusetMems is the set of memory nodes the container will use. Formatted as 0-3 or 0,2. Default (if unset) is all memory nodes.

§devices: Option<Vec<InspectDevice>>

Devices is a list of device nodes that will be added to the container. These are stored in the OCI spec only as type, major, minor while we display the host path. We convert this with /sys/dev, but we cannot guarantee that the host path will be identical - only that the actual device will be.

§disk_quota: Option<u64>

DiskQuota is the maximum amount of disk space the container may use (in bytes). Presently not populated. TODO.

§dns: Option<Vec<String>>

Dns is a list of DNS nameservers that will be added to the container’s resolv.conf

§dns_options: Option<Vec<String>>

DnsOptions is a list of DNS options that will be set in the container’s resolv.conf

§dns_search: Option<Vec<String>>

DnsSearch is a list of DNS search domains that will be set in the container’s resolv.conf

§extra_hosts: Option<Vec<String>>

ExtraHosts contains hosts that will be aded to the container’s etc/hosts.

§group_add: Option<Vec<String>>

GroupAdd contains groups that the user inside the container will be added to.

§id_mappings: Option<InspectIdMappings>§io_maximum_bandwidth: Option<u64>

IOMaximumBandwidth is Windows-only and not presently implemented.

§io_maximum_i_ops: Option<u64>

IOMaximumIOps is Windows-only and not presently implemented.

§init: Option<bool>

Init indicates whether the container has an init mounted into it.

§ipc_mode: Option<String>

IpcMode represents the configuration of the container’s IPC namespace. Populated as follows: “” (empty string) - Default, an IPC namespace will be created host - No IPC namespace created container: - Using another container’s IPC namespace ns: - A path to an IPC namespace has been specified

§isolation: Option<String>

Isolation is presently unused and provided solely for Docker compatibility.

§kernel_memory: Option<i64>

KernelMemory is the maximum amount of memory the kernel will devote to the container.

§links: Option<Vec<String>>

Links is unused, and provided purely for Docker compatibility.

§log_config: Option<InspectLogConfig>§memory: Option<i64>

Memory indicates the memory resources allocated to the container. This is the limit (in bytes) of RAM the container may use.

§memory_reservation: Option<i64>

MemoryReservation is the reservation (soft limit) of memory available to the container. Soft limits are warnings only and can be exceeded.

§memory_swap: Option<i64>

MemorySwap is the total limit for all memory available to the container, including swap. 0 indicates that there is no limit to the amount of memory available.

§memory_swappiness: Option<i64>

MemorySwappiness is the willingness of the kernel to page container memory to swap. It is an integer from 0 to 100, with low numbers being more likely to be put into swap. 1, the default, will not set swappiness and use the system defaults.

§nano_cpus: Option<i64>

NanoCpus indicates number of CPUs allocated to the container. It is an integer where one full CPU is indicated by 1000000000 (one billion). Thus, 2.5 CPUs (fractional portions of CPUs are allowed) would be 2500000000 (2.5 billion). In ‘docker inspect’ this is set exclusively of two further options in the output (CpuPeriod and CpuQuota) which are both used to implement this functionality. We can’t distinguish here, so if CpuQuota is set to the default of 100000, we will set both CpuQuota, CpuPeriod, and NanoCpus. If CpuQuota is not the default, we will not set NanoCpus.

§network_mode: Option<String>

NetworkMode is the configuration of the container’s network namespace. Populated as follows: default - A network namespace is being created and configured via CNI none - A network namespace is being created, not configured via CNI host - No network namespace created container: - Using another container’s network namespace ns: - A path to a network namespace has been specified

§oom_kill_disable: Option<bool>

OomKillDisable indicates whether the kernel OOM killer is disabled for the container.

§oom_score_adj: Option<i64>

OOMScoreAdj is an adjustment that will be made to the container’s OOM score.

§pid_mode: Option<String>

PidMode represents the configuration of the container’s PID namespace. Populated as follows: “” (empty string) - Default, a PID namespace will be created host - No PID namespace created container: - Using another container’s PID namespace ns: - A path to a PID namespace has been specified

§pids_limit: Option<i64>

PidsLimit is the maximum number of PIDs that may be created within the container. 0, the default, indicates no limit.

§port_bindings: Option<HashMap<String, Option<Vec<InspectHostPort>>>>

PortBindings contains the container’s port bindings. It is formatted as map[string][]InspectHostPort. The string key here is formatted as / and represents the container port. A single container port may be bound to multiple host ports (on different IPs).

§privileged: Option<bool>

Privileged indicates whether the container is running with elevated privileges. This has a very specific meaning in the Docker sense, so it’s very difficult to decode from the spec and config, and so is stored as an annotation.

§publish_all_ports: Option<bool>

PublishAllPorts indicates whether image ports are being published. This is not directly stored in libpod and is saved as an annotation.

§readonly_rootfs: Option<bool>

ReadonlyRootfs is whether the container will be mounted read-only.

§restart_policy: Option<InspectRestartPolicy>§runtime: Option<String>

Runtime is provided purely for Docker compatibility. It is set unconditionally to “oci” as Podman does not presently support non-OCI runtimes.

§security_opt: Option<Vec<String>>

SecurityOpt is a list of security-related options that are set in the container.

§shm_size: Option<i64>§tmpfs: Option<HashMap<String, String>>

Tmpfs is a list of tmpfs filesystems that will be mounted into the container. It is a map of destination path to options for the mount.

§uts_mode: Option<String>

UTSMode represents the configuration of the container’s UID namespace. Populated as follows: “” (empty string) - Default, a UTS namespace will be created host - no UTS namespace created container: - Using another container’s UTS namespace ns: - A path to a UTS namespace has been specified

§ulimits: Option<Vec<InspectUlimit>>

Ulimits is a set of ulimits that will be set within the container.

§userns_mode: Option<String>

UsernsMode represents the configuration of the container’s user namespace. When running rootless, a user namespace is created outside of libpod to allow some privileged operations. This will not be reflected here. Populated as follows: “” (empty string) - No user namespace will be created private - The container will be run in a user namespace container: - Using another container’s user namespace ns: - A path to a user namespace has been specified TODO Rootless has an additional ‘keep-id’ option, presently not reflected here.

§volume_driver: Option<String>

VolumeDriver is presently unused and is retained for Docker compatibility.

§volumes_from: Option<Vec<String>>

VolumesFrom is a list of containers which this container uses volumes from. This is not handled directly within libpod and is stored in an annotation. It is formatted as an array of container names and IDs.

Trait Implementations§

Source§

impl Clone for InspectContainerHostConfig

Source§

fn clone(&self) -> InspectContainerHostConfig

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 InspectContainerHostConfig

Source§

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

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

impl<'de> Deserialize<'de> for InspectContainerHostConfig

Source§

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

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

impl PartialEq for InspectContainerHostConfig

Source§

fn eq(&self, other: &InspectContainerHostConfig) -> 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 InspectContainerHostConfig

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 InspectContainerHostConfig

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