pub struct ContainerCreateOptsBuilder { /* private fields */ }
Expand description
A builder struct for ContainerCreateOpts.
Implementations§
Source§impl ContainerCreateOptsBuilder
impl ContainerCreateOptsBuilder
Sourcepub fn build(self) -> ContainerCreateOpts
pub fn build(self) -> ContainerCreateOpts
Finish building ContainerCreateOpts.
Source§impl ContainerCreateOptsBuilder
impl ContainerCreateOptsBuilder
Sourcepub fn annotations<K, V>(
self,
annotations: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn annotations<K, V>( self, annotations: impl IntoIterator<Item = (K, V)>, ) -> Self
Annotations are key-value options passed into the container runtime that can be used to trigger special behavior.
Sourcepub fn apparmor_profile(self, apparmor_profile: impl Serialize) -> Self
pub fn apparmor_profile(self, apparmor_profile: impl Serialize) -> Self
ApparmorProfile is the name of the Apparmor profile the container will use.
Sourcepub fn add_capabilities<S>(
self,
add_capabilities: impl IntoIterator<Item = S>,
) -> Selfwhere
S: Serialize,
pub fn add_capabilities<S>(
self,
add_capabilities: impl IntoIterator<Item = S>,
) -> Selfwhere
S: Serialize,
Capabilities which will be added to the container. Conflicts with
privileged
.
Sourcepub fn drop_capabilities<S>(
self,
drop_capabilities: impl IntoIterator<Item = S>,
) -> Selfwhere
S: Serialize,
pub fn drop_capabilities<S>(
self,
drop_capabilities: impl IntoIterator<Item = S>,
) -> Selfwhere
S: Serialize,
Capabilities which will be removed from the container. Conflicts with
privileged
.
Sourcepub fn cgroup_parent(self, cgroup_parent: impl Serialize) -> Self
pub fn cgroup_parent(self, cgroup_parent: impl Serialize) -> Self
Set the container’s CGroup parent. If not set, the default for the current cgroup driver will be used.
Sourcepub fn cgroup_namespace(self, cgroup_namespace: Namespace) -> Self
pub fn cgroup_namespace(self, cgroup_namespace: Namespace) -> Self
Namespace to use for cgroups.
Sourcepub fn cgroup_mode(self, cgroup_mode: impl Serialize) -> Self
pub fn cgroup_mode(self, cgroup_mode: impl Serialize) -> Self
Sets a policy for how cgroups will be created in the container, including the ability to disable creation entirely.
Sourcepub fn chroot_directories<S>(
self,
chroot_directories: impl IntoIterator<Item = S>,
) -> Selfwhere
S: Serialize,
pub fn chroot_directories<S>(
self,
chroot_directories: impl IntoIterator<Item = S>,
) -> Selfwhere
S: Serialize,
Additional set of directories that need to be treated as root directories. Standard bind mounts will be mounted into paths relative to these directories.
Sourcepub fn command<S>(self, command: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn command<S>(self, command: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
Command that the container should run. If not given and Image is specified, this will be populated by the image’s configuration.
Sourcepub fn common_pid_file(self, common_pid_file: impl Serialize) -> Self
pub fn common_pid_file(self, common_pid_file: impl Serialize) -> Self
A path at which a PID file for Conmon will be placed. If not given, a default location will be used.
Sourcepub fn create_command<S>(
self,
create_command: impl IntoIterator<Item = S>,
) -> Selfwhere
S: Serialize,
pub fn create_command<S>(
self,
create_command: impl IntoIterator<Item = S>,
) -> Selfwhere
S: Serialize,
The command that was used to create this container. This will be returned when inspecting the container.
Sourcepub fn cpu_period(self, cpu_period: u64) -> Self
pub fn cpu_period(self, cpu_period: u64) -> Self
CPU period of the cpuset
Sourcepub fn create_working_dir(self, create_working_dir: bool) -> Self
pub fn create_working_dir(self, create_working_dir: bool) -> Self
Create the working directory if it doesn’t exist. If unset, it doesn’t create it.
Sourcepub fn dependency_containers<S>(
self,
dependency_containers: impl IntoIterator<Item = S>,
) -> Selfwhere
S: Serialize,
pub fn dependency_containers<S>(
self,
dependency_containers: impl IntoIterator<Item = S>,
) -> Selfwhere
S: Serialize,
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.
Sourcepub fn device_cgroup_rule(
self,
device_cgroup_rule: impl IntoIterator<Item = LinuxDeviceCgroup>,
) -> Self
pub fn device_cgroup_rule( self, device_cgroup_rule: impl IntoIterator<Item = LinuxDeviceCgroup>, ) -> Self
DeviceCgroupRule are device cgroup rules that allow containers to use additional types of devices.
Sourcepub fn devices(self, devices: impl IntoIterator<Item = LinuxDevice>) -> Self
pub fn devices(self, devices: impl IntoIterator<Item = LinuxDevice>) -> Self
Devices are devices that will be added to the container.
Sourcepub fn devices_from<S>(self, devices_from: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn devices_from<S>(self, devices_from: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
A way to ensure your container inherits device specific information from another container.
Sourcepub fn dns_option<S>(self, dns_option: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn dns_option<S>(self, dns_option: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
A set of DNS options that will be used in the container’s resolv.conf, replacing the host’s
DNS options which are used by default. Conflicts with
use_image_resolv_conf
.
Sourcepub fn dns_search<S>(self, dns_search: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn dns_search<S>(self, dns_search: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
A set of DNS search domains that will be used in the container’s resolv.conf, replacing
the host’s DNS search domains which are used by default. Conflicts with
use_image_resolv_conf
.
Sourcepub fn dns_server<S>(self, dns_server: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn dns_server<S>(self, dns_server: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
A set of DNS servers that will be used in the container’s resolv.conf, replacing the
host’s DNS Servers which are used by default. Conflicts with
use_image_resolv_conf
.
Sourcepub fn entrypoint<S>(self, entrypoint: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn entrypoint<S>(self, entrypoint: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
Container’s entrypoint. If not given and Image is specified, this will be populated by the image’s configuration.
Sourcepub fn env<K, V>(self, env: impl IntoIterator<Item = (K, V)>) -> Self
pub fn env<K, V>(self, env: impl IntoIterator<Item = (K, V)>) -> Self
A list of environment variables that will be set in the container.
Sourcepub fn env_host(self, env_host: bool) -> Self
pub fn env_host(self, env_host: bool) -> Self
Indicates that the host environment should be added to container.
Sourcepub fn envmerge<S>(self, envmerge: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn envmerge<S>(self, envmerge: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
Takes the specified environment variables from image and preprocess them before injecting them into the container.
Sourcepub fn groups<S>(self, groups: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn groups<S>(self, groups: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
Groups are a list of supplemental groups the container’s user will be granted access to.
Sourcepub fn health_check_on_failure_action(
self,
health_check_on_failure_action: i64,
) -> Self
pub fn health_check_on_failure_action( self, health_check_on_failure_action: i64, ) -> Self
Defines how Podman reacts when a container’s health status turns unhealthy.
Sourcepub fn health_config(self, health_config: Schema2HealthConfig) -> Self
pub fn health_config(self, health_config: Schema2HealthConfig) -> Self
Health config which holds configuration settings for the HEALTHCHECK feature, from docker/docker/api/types/container.
Sourcepub fn host_device_list(
self,
host_device_list: impl IntoIterator<Item = LinuxDevice>,
) -> Self
pub fn host_device_list( self, host_device_list: impl IntoIterator<Item = LinuxDevice>, ) -> Self
The bits have the same definition on all systems, so that information about files can be moved from one system to another portably. Not all bits apply to all systems. The only required bit is ModeDir for directories.
Sourcepub fn hosts_add<S>(self, hosts_add: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn hosts_add<S>(self, hosts_add: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
A set of hosts which will be added to the container’s etc/hosts file. Conflicts with
use_image_hosts
.
Sourcepub fn hostname(self, hostname: impl Serialize) -> Self
pub fn hostname(self, hostname: impl Serialize) -> Self
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.
Sourcepub fn hostusers<S>(self, hostusers: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn hostusers<S>(self, hostusers: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
List of host usernames or UIDs to add to the container etc/passwd file.
Sourcepub fn http_proxy(self, http_proxy: bool) -> Self
pub fn http_proxy(self, http_proxy: bool) -> Self
Indicates that the http host proxy environment variables should be added to container.
Sourcepub fn id_mappings(self, id_mappings: IdMappingOptions) -> Self
pub fn id_mappings(self, id_mappings: IdMappingOptions) -> Self
Used for specifying how ID mapping should be set up for a layer or container.
Sourcepub fn image_arch(self, image_arch: impl Serialize) -> Self
pub fn image_arch(self, image_arch: impl Serialize) -> Self
User-specified image architecture
Sourcepub fn image_variant(self, image_variant: impl Serialize) -> Self
pub fn image_variant(self, image_variant: impl Serialize) -> Self
User-specified image variant
Sourcepub fn image_volume_mode(self, image_volume_mode: ImageVolumeMode) -> Self
pub fn image_volume_mode(self, image_volume_mode: ImageVolumeMode) -> Self
Indicates how image volumes will be created. The default if unset is
anonymous
.
Sourcepub fn image_volumes(
self,
image_volumes: impl IntoIterator<Item = ImageVolume>,
) -> Self
pub fn image_volumes( self, image_volumes: impl IntoIterator<Item = ImageVolume>, ) -> Self
Image volumes bind-mount a container-image mount into the container.
Sourcepub fn init(self, init: bool) -> Self
pub fn init(self, init: bool) -> Self
Specifies that an init binary will be mounted into the container, and will be used as PID1.
Sourcepub fn init_container_type(self, init_container_type: impl Serialize) -> Self
pub fn init_container_type(self, init_container_type: impl Serialize) -> Self
Describes if this container is an init container and if so, what type: always or once.
Sourcepub fn ipc_namespace(self, ipc_namespace: Namespace) -> Self
pub fn ipc_namespace(self, ipc_namespace: Namespace) -> Self
Namespace to use for IPC.
Sourcepub fn labels<K, V>(self, labels: impl IntoIterator<Item = (K, V)>) -> Self
pub fn labels<K, V>(self, labels: impl IntoIterator<Item = (K, V)>) -> Self
A list of labels that will be assigned to the container.
Sourcepub fn log_configuration(self, log_configuration: LogConfig) -> Self
pub fn log_configuration(self, log_configuration: LogConfig) -> Self
Logging configuration for the container.
Sourcepub fn manage_password(self, manage_password: bool) -> Self
pub fn manage_password(self, manage_password: bool) -> Self
Container run option that determines if we are validating users/groups before running the container.
Sourcepub fn mask<S>(self, mask: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn mask<S>(self, mask: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
The path we want to mask in the container. This masks the paths given in addition to the default list.
Sourcepub fn mounts(self, mounts: impl IntoIterator<Item = ContainerMount>) -> Self
pub fn mounts(self, mounts: impl IntoIterator<Item = ContainerMount>) -> Self
Mounts that will be added to the container. These will supersede
image_volumes
and
volumes_from
volumes where there
are conflicts.
Sourcepub fn name(self, name: impl Serialize) -> Self
pub fn name(self, name: impl Serialize) -> Self
The name the container will be given. If no name is provided, one will be randomly generated.
Sourcepub fn namespace(self, namespace: impl Serialize) -> Self
pub fn namespace(self, namespace: impl Serialize) -> Self
The libpod namespace the container will be placed in.
Sourcepub fn net_namespace(self, net_namespace: Namespace) -> Self
pub fn net_namespace(self, net_namespace: Namespace) -> Self
Namespace to use for network.
Sourcepub fn network_options<K, V>(
self,
network_options: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn network_options<K, V>( self, network_options: impl IntoIterator<Item = (K, V)>, ) -> Self
Additional options for each network.
Sourcepub fn networks<K, V>(self, networks: impl IntoIterator<Item = (K, V)>) -> Self
pub fn networks<K, V>(self, networks: impl IntoIterator<Item = (K, V)>) -> Self
Map of networks names or ids that the container should join. You can request additional settings for each network, you can set network aliases, static ips, static mac address and the network interface name for this container on the specific network. If the map is empty and the bridge network mode is set the container will be joined to the default network.
Sourcepub fn no_new_privilages(self, no_new_privilages: bool) -> Self
pub fn no_new_privilages(self, no_new_privilages: bool) -> Self
Whether the container will set the no new privileges flag on create, which disables gaining additional privileges (e.g. via setuid) in the container.
Sourcepub fn oci_runtime(self, oci_runtime: impl Serialize) -> Self
pub fn oci_runtime(self, oci_runtime: impl Serialize) -> Self
The name of the OCI runtime that will be used to create the container. If not specified, the default will be used.
Sourcepub fn oom_score_adj(self, oom_score_adj: i64) -> Self
pub fn oom_score_adj(self, oom_score_adj: i64) -> Self
Adjusts the score used by the OOM killer to determine processes to kill for the container’s process.
Sourcepub fn overlay_volumes(
self,
overlay_volumes: impl IntoIterator<Item = OverlayVolume>,
) -> Self
pub fn overlay_volumes( self, overlay_volumes: impl IntoIterator<Item = OverlayVolume>, ) -> Self
Overlay volumes are named volumes that will be added to the container.
Sourcepub fn passwd_entry(self, passwd_entry: impl Serialize) -> Self
pub fn passwd_entry(self, passwd_entry: impl Serialize) -> Self
Specifies arbitrary data to append to a file.
Sourcepub fn personality(self, personality: LinuxPersonality) -> Self
pub fn personality(self, personality: LinuxPersonality) -> Self
Specify the Linux personality syscall input.
Sourcepub fn pid_namespace(self, pid_namespace: Namespace) -> Self
pub fn pid_namespace(self, pid_namespace: Namespace) -> Self
Namespace to use for pids.
Sourcepub fn portmappings(
self,
portmappings: impl IntoIterator<Item = PortMapping>,
) -> Self
pub fn portmappings( self, portmappings: impl IntoIterator<Item = PortMapping>, ) -> Self
Set of ports to map into the container. Only available if NetNS is set to bridge or slirp.
Sourcepub fn privileged(self, privileged: bool) -> Self
pub fn privileged(self, privileged: bool) -> Self
Whether the container is privileged. Privileged does the following: Adds all devices on the system to the container. Adds all capabilities to the container. Disables Seccomp, SELinux, and Apparmor confinement. (Though SELinux can be manually re-enabled).
Sourcepub fn procfs_opts<S>(self, procfs_opts: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn procfs_opts<S>(self, procfs_opts: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
The options used for the proc mount.
Sourcepub fn publish_image_ports(self, publish_image_ports: bool) -> Self
pub fn publish_image_ports(self, publish_image_ports: bool) -> Self
If set to true the ports specified in the image will be published to random unused ports
(guaranteed to be above 1024) on the host. This is based on ports set in Expose below,
and any ports specified by the Image (if one is given). Only available if
net_namespace
is set to Bridge or Slirp.
Sourcepub fn r_limits(self, r_limits: impl IntoIterator<Item = PosixRlimit>) -> Self
pub fn r_limits(self, r_limits: impl IntoIterator<Item = PosixRlimit>) -> Self
Rlimits are POSIX rlimits to apply to the container. Optional.
Sourcepub fn raw_image_name(self, raw_image_name: impl Serialize) -> Self
pub fn raw_image_name(self, raw_image_name: impl Serialize) -> Self
The user-specified and unprocessed input referring to a local or a remote image.
Sourcepub fn read_only_fs(self, read_only_fs: bool) -> Self
pub fn read_only_fs(self, read_only_fs: bool) -> Self
If set to true everything will be mounted as read-only.
Sourcepub fn remove(self, remove: bool) -> Self
pub fn remove(self, remove: bool) -> Self
If set to true the container will be removed upon exitting.
Sourcepub fn resource_limits(self, resource_limits: LinuxResources) -> Self
pub fn resource_limits(self, resource_limits: LinuxResources) -> Self
Set the container runtime resource contstraints.
Sourcepub fn restart_policy(self, restart_policy: ContainerRestartPolicy) -> Self
pub fn restart_policy(self, restart_policy: ContainerRestartPolicy) -> Self
An action which will be taken when the container exits. If not given, the default policy, which does nothing, will be used.
Sourcepub fn restart_tries(self, restart_tries: u64) -> Self
pub fn restart_tries(self, restart_tries: u64) -> Self
The number of attempts that will be made to restart the container. Only available
when restart_policy
is set to on-failure
.
Sourcepub fn rootfs_overlay(self, rootfs_overlay: bool) -> Self
pub fn rootfs_overlay(self, rootfs_overlay: bool) -> Self
Tells if rootfs is actuall an overlay on top of base path.
Sourcepub fn rootfs_propagation(self, rootfs_propagation: impl Serialize) -> Self
pub fn rootfs_propagation(self, rootfs_propagation: impl Serialize) -> Self
The rootfs propagation mode for the container. If not set, the default of rslave will be used.
Sourcepub fn sdnotify_mode(self, sdnotify_mode: SocketNotifyMode) -> Self
pub fn sdnotify_mode(self, sdnotify_mode: SocketNotifyMode) -> Self
Determine how to handle NOTIFY_SOCKET
.
Sourcepub fn seccomp_policy(self, seccomp_policy: SeccompPolicy) -> Self
pub fn seccomp_policy(self, seccomp_policy: SeccompPolicy) -> Self
Determines which seccomp profile gets applied the container.
Sourcepub fn seccomp_profile_path(self, seccomp_profile_path: impl Serialize) -> Self
pub fn seccomp_profile_path(self, seccomp_profile_path: impl Serialize) -> Self
The path to a JSON file containing the container’s Seccomp profile. If not specified, no Seccomp profile will be used.
Sourcepub fn secret_env<K, V>(
self,
secret_env: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn secret_env<K, V>( self, secret_env: impl IntoIterator<Item = (K, V)>, ) -> Self
A list of secrets that will be set as environment variables.
Sourcepub fn secrets(self, secrets: impl IntoIterator<Item = Secret>) -> Self
pub fn secrets(self, secrets: impl IntoIterator<Item = Secret>) -> Self
Secrets are the secrets that will be added to the container.
Sourcepub fn selinux_opts<S>(self, selinux_opts: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn selinux_opts<S>(self, selinux_opts: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
The process label the container will use. if SELinux is enabled and this is not specified, a label will be automatically generated if not specified.
Sourcepub fn shm_size(self, shm_size: i64) -> Self
pub fn shm_size(self, shm_size: i64) -> Self
The size of the tmpfs to mount in at /dev/shm, in bytes.
Sourcepub fn stop_signal(self, stop_signal: i64) -> Self
pub fn stop_signal(self, stop_signal: i64) -> Self
A number describing a process signal.
Sourcepub fn stop_timeout(self, stop_timeout: u64) -> Self
pub fn stop_timeout(self, stop_timeout: u64) -> Self
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.
Sourcepub fn storage_opts<K, V>(
self,
storage_opts: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn storage_opts<K, V>( self, storage_opts: impl IntoIterator<Item = (K, V)>, ) -> Self
A list of container’s storage options.
Sourcepub fn sysctl<K, V>(self, sysctl: impl IntoIterator<Item = (K, V)>) -> Self
pub fn sysctl<K, V>(self, sysctl: impl IntoIterator<Item = (K, V)>) -> Self
A list of kernel parameters to set in the container.
pub fn systemd(self, systemd: SystemdEnabled) -> Self
Sourcepub fn throttle_read_bps_device<K, V>(
self,
throttle_read_bps_device: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn throttle_read_bps_device<K, V>( self, throttle_read_bps_device: impl IntoIterator<Item = (K, V)>, ) -> Self
IO read rate limit per cgroup per device, bytes per second
Sourcepub fn throttle_read_iops_device<K, V>(
self,
throttle_read_iops_device: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn throttle_read_iops_device<K, V>( self, throttle_read_iops_device: impl IntoIterator<Item = (K, V)>, ) -> Self
IO read rate limit per cgroup per device, IO per second
Sourcepub fn throttle_write_bps_device<K, V>(
self,
throttle_write_bps_device: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn throttle_write_bps_device<K, V>( self, throttle_write_bps_device: impl IntoIterator<Item = (K, V)>, ) -> Self
IO write rate limit per cgroup per device, bytes per second
Sourcepub fn throttle_write_iops_device<K, V>(
self,
throttle_write_iops_device: impl IntoIterator<Item = (K, V)>,
) -> Self
pub fn throttle_write_iops_device<K, V>( self, throttle_write_iops_device: impl IntoIterator<Item = (K, V)>, ) -> Self
IO write rate limit per cgroup per device, IO per second
Sourcepub fn timeout(self, timeout: u64) -> Self
pub fn timeout(self, timeout: u64) -> Self
A maximum time in seconds the container will run before main process is sent SIGKILL. If 0 is used, signal will not be sent.
Sourcepub fn timezone(self, timezone: impl Serialize) -> Self
pub fn timezone(self, timezone: impl Serialize) -> Self
The timezone inside the container. Local means it has the same timezone as the host machine.
Sourcepub fn umask(self, umask: impl Serialize) -> Self
pub fn umask(self, umask: impl Serialize) -> Self
The umask the init process of the container will be run with.
Sourcepub fn unified<K, V>(self, unified: impl IntoIterator<Item = (K, V)>) -> Self
pub fn unified<K, V>(self, unified: impl IntoIterator<Item = (K, V)>) -> Self
A list of key-value options passed into the container runtime that are used to configure cgroup v2.
Sourcepub fn unmask<S>(self, unmask: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn unmask<S>(self, unmask: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
The path we want to unmask in the container. To override all the default paths that are masked, set unmask=ALL.
Sourcepub fn unset_env<S>(self, unset_env: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn unset_env<S>(self, unset_env: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
A list of environment variables to unset if specified in the image or from buildin or containers.conf
Sourcepub fn unset_env_all(self, unset_env_all: bool) -> Self
pub fn unset_env_all(self, unset_env_all: bool) -> Self
If true all environment variables from the image or from buldin or containers.conf will get unset.
Sourcepub fn use_image_hosts(self, use_image_hosts: bool) -> Self
pub fn use_image_hosts(self, use_image_hosts: bool) -> Self
Indicates that /etc/hosts should not be managed by Podman, and instead sourced from the image.
Conflicts with hosts_add
.
Sourcepub fn use_image_resolv_conf(self, use_image_resolv_conf: bool) -> Self
pub fn use_image_resolv_conf(self, use_image_resolv_conf: bool) -> Self
Indicates that /etc/hosts should not be managed by Podman, and instead sourced from the image.
Conflicts with dns_server
,
dns_search
,
dns_option
.
Sourcepub fn user(self, user: impl Serialize) -> Self
pub fn user(self, user: impl Serialize) -> Self
The user the container will be run as. Can be given as a UID or a username; if a username, it will be resolved within the container, using the container’s /etc/passwd. If unset, the container will be run as root.
Sourcepub fn user_namespace(self, user_namespace: Namespace) -> Self
pub fn user_namespace(self, user_namespace: Namespace) -> Self
Namespace to use for users.
Sourcepub fn uts_namespace(self, uts_namespace: Namespace) -> Self
pub fn uts_namespace(self, uts_namespace: Namespace) -> Self
Namespace to use for uts.
Sourcepub fn volatile(self, volatile: bool) -> Self
pub fn volatile(self, volatile: bool) -> Self
Specifies whether the container storage can be optimized at the cost of not syncing all the dirty files in memory.
Sourcepub fn volumes(self, volumes: impl IntoIterator<Item = NamedVolume>) -> Self
pub fn volumes(self, volumes: impl IntoIterator<Item = NamedVolume>) -> Self
Specifies the container volume to use with this container.
Sourcepub fn volumes_from<S>(self, volumes_from: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
pub fn volumes_from<S>(self, volumes_from: impl IntoIterator<Item = S>) -> Selfwhere
S: Serialize,
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.
Sourcepub fn weight_device(self, weight_device: LinuxWeightDevice) -> Self
pub fn weight_device(self, weight_device: LinuxWeightDevice) -> Self
Weight per cgroup per device.
Trait Implementations§
Source§impl Clone for ContainerCreateOptsBuilder
impl Clone for ContainerCreateOptsBuilder
Source§fn clone(&self) -> ContainerCreateOptsBuilder
fn clone(&self) -> ContainerCreateOptsBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more