Struct ContainerBasicConfig

Source
pub struct ContainerBasicConfig {
Show 43 fields pub annotations: Option<HashMap<String, String>>, pub command: Option<Vec<String>>, pub conmon_pid_file: Option<String>, pub container_create_command: Option<Vec<String>>, pub dependency_containers: Option<Vec<String>>, pub entrypoint: Option<Vec<String>>, pub env: Option<HashMap<String, String>>, pub env_host: Option<bool>, pub envmerge: Option<Vec<String>>, pub hostname: Option<String>, pub hostusers: Option<Vec<String>>, pub httpproxy: Option<bool>, pub image_arch: Option<String>, pub image_os: Option<String>, pub image_variant: Option<String>, pub init_container_type: Option<String>, pub labels: Option<HashMap<String, String>>, pub log_configuration: Option<LogConfigLibpod>, pub manage_password: Option<bool>, pub name: Option<String>, pub namespace: Option<String>, pub oci_runtime: Option<String>, pub passwd_entry: Option<String>, pub personality: Option<LinuxPersonality>, pub pidns: Option<Namespace>, pub pod: Option<String>, pub raw_image_name: Option<String>, pub remove: Option<bool>, pub restart_policy: Option<String>, pub restart_tries: Option<u64>, pub sdnotify_mode: Option<String>, pub secret_env: Option<HashMap<String, String>>, pub stdin: Option<bool>, pub stop_signal: Option<i64>, pub stop_timeout: Option<u64>, pub sysctl: Option<HashMap<String, String>>, pub systemd: Option<String>, pub terminal: Option<bool>, pub timeout: Option<u64>, pub timezone: Option<String>, pub unsetenv: Option<Vec<String>>, pub unsetenvall: Option<bool>, pub utsns: Option<Namespace>,
}

Fields§

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

Annotations are key-value options passed into the container runtime that can be used to trigger special behavior. Optional.

§command: Option<Vec<String>>

Command is the container’s command. If not given and Image is specified, this will be populated by the image’s configuration. Optional.

§conmon_pid_file: Option<String>

ConmonPidFile is a path at which a PID file for Conmon will be placed. If not given, a default location will be used. Optional.

§container_create_command: Option<Vec<String>>

ContainerCreateCommand is the command that was used to create this container. This will be shown in the output of Inspect() on the container, and may also be used by some tools that wish to recreate the container (e.g. podman generate systemd --new). Optional.

§dependency_containers: Option<Vec<String>>

DependencyContainers is an array of containers this container depends on. Dependency containers must be started before this container. Dependencies can be specified by name or full/partial ID. Optional.

§entrypoint: Option<Vec<String>>

Entrypoint is the container’s entrypoint. If not given and Image is specified, this will be populated by the image’s configuration. Optional.

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

Env is a set of environment variables that will be set in the container. Optional.

§env_host: Option<bool>

EnvHost indicates that the host environment should be added to container Optional.

§envmerge: Option<Vec<String>>

EnvMerge takes the specified environment variables from image and preprocess them before injecting them into the container.

§hostname: Option<String>

Hostname is the container’s hostname. If not set, the hostname will not be modified (if UtsNS is not private) or will be set to the container ID (if UtsNS is private). Conflicts with UtsNS if UtsNS is not set to private. Optional.

§hostusers: Option<Vec<String>>

HostUses is a list of host usernames or UIDs to add to the container etc/passwd file

§httpproxy: Option<bool>

EnvHTTPProxy indicates that the http host proxy environment variables should be added to container Optional.

§image_arch: Option<String>

ImageArch is the user-specified image architecture

§image_os: Option<String>

ImageOS is the user-specified image OS

§image_variant: Option<String>

ImageVariant is the user-specified image variant

§init_container_type: Option<String>

InitContainerType describes if this container is an init container and if so, what type: always or once

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

Labels are key-value pairs that are used to add metadata to containers. Optional.

§log_configuration: Option<LogConfigLibpod>§manage_password: Option<bool>

Passwd is a container run option that determines if we are validating users/groups before running the container

§name: Option<String>

Name is the name the container will be given. If no name is provided, one will be randomly generated. Optional.

§namespace: Option<String>

Namespace is the libpod namespace the container will be placed in. Optional.

§oci_runtime: Option<String>

OCIRuntime is the name of the OCI runtime that will be used to create the container. If not specified, the default will be used. Optional.

§passwd_entry: Option<String>

PasswdEntry specifies arbitrary data to append to a file.

§personality: Option<LinuxPersonality>§pidns: Option<Namespace>§pod: Option<String>

Pod is the ID of the pod the container will join. Optional.

§raw_image_name: Option<String>

RawImageName is the user-specified and unprocessed input referring to a local or a remote image.

§remove: Option<bool>

Remove indicates if the container should be removed once it has been started and exits

§restart_policy: Option<String>

RestartPolicy is the container’s restart policy - an action which will be taken when the container exits. If not given, the default policy, which does nothing, will be used. Optional.

§restart_tries: Option<u64>

RestartRetries is the number of attempts that will be made to restart the container. Only available when RestartPolicy is set to “on-failure”. Optional.

§sdnotify_mode: Option<String>

Determine how to handle the NOTIFY_SOCKET - do we participate or pass it through “container” - let the OCI runtime deal with it, advertise conmon’s MAINPID “conmon-only” - advertise conmon’s MAINPID, send READY when started, don’t pass to OCI “ignore” - unset NOTIFY_SOCKET

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

EnvSecrets are secrets that will be set as environment variables Optional.

§stdin: Option<bool>

Stdin is whether the container will keep its STDIN open.

§stop_signal: Option<i64>§stop_timeout: Option<u64>

StopTimeout is a timeout between the container’s stop signal being sent and SIGKILL being sent. If not provided, the default will be used. If 0 is used, stop signal will not be sent, and SIGKILL will be sent instead. Optional.

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

Sysctl sets kernel parameters for the container

§systemd: Option<String>

Systemd is whether the container will be started in systemd mode. Valid options are “true”, “false”, and “always”. “true” enables this mode only if the binary run in the container is sbin/init or systemd. “always” unconditionally enables systemd mode. “false” unconditionally disables systemd mode. If enabled, mounts and stop signal will be modified. If set to “always” or set to “true” and conditionally triggered, conflicts with StopSignal. If not specified, “false” will be assumed. Optional.

§terminal: Option<bool>

Terminal is whether the container will create a PTY. Optional.

§timeout: Option<u64>

Timeout is a maximum time in seconds the container will run before main process is sent SIGKILL. If 0 is used, signal will not be sent. Container can run indefinitely Optional.

§timezone: Option<String>

Timezone is the timezone inside the container. Local means it has the same timezone as the host machine Optional.

§unsetenv: Option<Vec<String>>

UnsetEnv unsets the specified default environment variables from the image or from buildin or containers.conf Optional.

§unsetenvall: Option<bool>

UnsetEnvAll unsetall default environment variables from the image or from buildin or containers.conf UnsetEnvAll unsets all default environment variables from the image or from buildin Optional.

§utsns: Option<Namespace>

Trait Implementations§

Source§

impl Clone for ContainerBasicConfig

Source§

fn clone(&self) -> ContainerBasicConfig

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 ContainerBasicConfig

Source§

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

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

impl<'de> Deserialize<'de> for ContainerBasicConfig

Source§

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

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

impl PartialEq for ContainerBasicConfig

Source§

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

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 ContainerBasicConfig

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