Struct ContainerStorageConfig

Source
pub struct ContainerStorageConfig {
Show 24 fields pub chroot_directories: Option<Vec<String>>, pub create_working_dir: Option<bool>, pub device_cgroup_rule: Option<Vec<LinuxDeviceCgroup>>, pub devices: Option<Vec<LinuxDevice>>, pub devices_from: Option<Vec<String>>, pub host_device_list: Option<Vec<LinuxDevice>>, pub image: Option<String>, pub image_volume_mode: Option<String>, pub image_volumes: Option<Vec<ImageVolume>>, pub init: Option<bool>, pub init_path: Option<String>, pub ipcns: Option<Namespace>, pub mounts: Option<Vec<Mount>>, pub overlay_volumes: Option<Vec<OverlayVolume>>, pub rootfs: Option<String>, pub rootfs_overlay: Option<bool>, pub rootfs_propagation: Option<String>, pub secrets: Option<Vec<Secret>>, pub shm_size: Option<i64>, pub storage_opts: Option<HashMap<String, String>>, pub volatile: Option<bool>, pub volumes: Option<Vec<NamedVolume>>, pub volumes_from: Option<Vec<String>>, pub work_dir: Option<String>,
}
Expand description

ContainerStorageConfig contains information on the storage configuration of a container.

Fields§

§chroot_directories: Option<Vec<String>>

ChrootDirs is an additional set of directories that need to be treated as root directories. Standard bind mounts will be mounted into paths relative to these directories.

§create_working_dir: Option<bool>

Create the working directory if it doesn’t exist. If unset, it doesn’t create it. Optional.

§device_cgroup_rule: Option<Vec<LinuxDeviceCgroup>>

DeviceCgroupRule are device cgroup rules that allow containers to use additional types of devices.

§devices: Option<Vec<LinuxDevice>>

Devices are devices that will be added to the container. Optional.

§devices_from: Option<Vec<String>>

DevicesFrom is a way to ensure your container inherits device specific information from another container

§host_device_list: Option<Vec<LinuxDevice>>

HostDeviceList is used to recreate the mounted device on inherited containers

§image: Option<String>

Image is the image the container will be based on. The image will be used as the container’s root filesystem, and its environment vars, volumes, and other configuration will be applied to the container. Conflicts with Rootfs. At least one of Image or Rootfs must be specified.

§image_volume_mode: Option<String>

ImageVolumeMode indicates how image volumes will be created. Supported modes are “ignore” (do not create), “tmpfs” (create as tmpfs), and “anonymous” (create as anonymous volumes). The default if unset is anonymous. Optional.

§image_volumes: Option<Vec<ImageVolume>>

Image volumes bind-mount a container-image mount into the container. Optional.

§init: Option<bool>

Init specifies that an init binary will be mounted into the container, and will be used as PID1.

§init_path: Option<String>

InitPath specifies the path to the init binary that will be added if Init is specified above. If not specified, the default set in the Libpod config will be used. Ignored if Init above is not set. Optional.

§ipcns: Option<Namespace>§mounts: Option<Vec<Mount>>

Mounts are mounts that will be added to the container. These will supersede Image Volumes and VolumesFrom volumes where there are conflicts. Optional.

§overlay_volumes: Option<Vec<OverlayVolume>>

Overlay volumes are named volumes that will be added to the container. Optional.

§rootfs: Option<String>

Rootfs is the path to a directory that will be used as the container’s root filesystem. No modification will be made to the directory, it will be directly mounted into the container as root. Conflicts with Image. At least one of Image or Rootfs must be specified.

§rootfs_overlay: Option<bool>

RootfsOverlay tells if rootfs is actually an overlay on top of base path

§rootfs_propagation: Option<String>

RootfsPropagation is the rootfs propagation mode for the container. If not set, the default of rslave will be used. Optional.

§secrets: Option<Vec<Secret>>

Secrets are the secrets that will be added to the container Optional.

§shm_size: Option<i64>

ShmSize is the size of the tmpfs to mount in at /dev/shm, in bytes. Conflicts with ShmSize if IpcNS is not private. Optional.

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

StorageOpts is the container’s storage options Optional.

§volatile: Option<bool>

Volatile specifies whether the container storage can be optimized at the cost of not syncing all the dirty files in memory.

§volumes: Option<Vec<NamedVolume>>

Volumes are named volumes that will be added to the container. These will supersede Image Volumes and VolumesFrom volumes where there are conflicts. Optional.

§volumes_from: Option<Vec<String>>

VolumesFrom is a set of containers whose volumes will be added to this container. The name or ID of the container must be provided, and may optionally be followed by a : and then one or more comma-separated options. Valid options are ‘ro’, ‘rw’, and ‘z’. Options will be used for all volumes sourced from the container.

§work_dir: Option<String>

WorkDir is the container’s working directory. If unset, the default, /, will be used. Optional.

Trait Implementations§

Source§

impl Clone for ContainerStorageConfig

Source§

fn clone(&self) -> ContainerStorageConfig

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 ContainerStorageConfig

Source§

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

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

impl<'de> Deserialize<'de> for ContainerStorageConfig

Source§

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

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

impl PartialEq for ContainerStorageConfig

Source§

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

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 ContainerStorageConfig

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