Struct pulumi_wasm_docker::container::ContainerArgs

source ·
pub struct ContainerArgs {
Show 62 fields pub attach: Output<Option<bool>>, pub capabilities: Output<Option<ContainerCapabilities>>, pub cgroupns_mode: Output<Option<String>>, pub command: Output<Option<Vec<String>>>, pub container_read_refresh_timeout_milliseconds: Output<Option<i32>>, pub cpu_set: Output<Option<String>>, pub cpu_shares: Output<Option<i32>>, pub destroy_grace_seconds: Output<Option<i32>>, pub devices: Output<Option<Vec<ContainerDevice>>>, pub dns: Output<Option<Vec<String>>>, pub dns_opts: Output<Option<Vec<String>>>, pub dns_searches: Output<Option<Vec<String>>>, pub domainname: Output<Option<String>>, pub entrypoints: Output<Option<Vec<String>>>, pub envs: Output<Option<Vec<String>>>, pub gpus: Output<Option<String>>, pub group_adds: Output<Option<Vec<String>>>, pub healthcheck: Output<Option<ContainerHealthcheck>>, pub hostname: Output<Option<String>>, pub hosts: Output<Option<Vec<ContainerHost>>>, pub image: Output<String>, pub init: Output<Option<bool>>, pub ipc_mode: Output<Option<String>>, pub labels: Output<Option<Vec<ContainerLabel>>>, pub log_driver: Output<Option<String>>, pub log_opts: Output<Option<HashMap<String, String>>>, pub logs: Output<Option<bool>>, pub max_retry_count: Output<Option<i32>>, pub memory: Output<Option<i32>>, pub memory_swap: Output<Option<i32>>, pub mounts: Output<Option<Vec<ContainerMount>>>, pub must_run: Output<Option<bool>>, pub name: Output<Option<String>>, pub network_mode: Output<Option<String>>, pub networks_advanced: Output<Option<Vec<ContainerNetworksAdvanced>>>, pub pid_mode: Output<Option<String>>, pub ports: Output<Option<Vec<ContainerPort>>>, pub privileged: Output<Option<bool>>, pub publish_all_ports: Output<Option<bool>>, pub read_only: Output<Option<bool>>, pub remove_volumes: Output<Option<bool>>, pub restart: Output<Option<String>>, pub rm: Output<Option<bool>>, pub runtime: Output<Option<String>>, pub security_opts: Output<Option<Vec<String>>>, pub shm_size: Output<Option<i32>>, pub start: Output<Option<bool>>, pub stdin_open: Output<Option<bool>>, pub stop_signal: Output<Option<String>>, pub stop_timeout: Output<Option<i32>>, pub storage_opts: Output<Option<HashMap<String, String>>>, pub sysctls: Output<Option<HashMap<String, String>>>, pub tmpfs: Output<Option<HashMap<String, String>>>, pub tty: Output<Option<bool>>, pub ulimits: Output<Option<Vec<ContainerUlimit>>>, pub uploads: Output<Option<Vec<ContainerUpload>>>, pub user: Output<Option<String>>, pub userns_mode: Output<Option<String>>, pub volumes: Output<Option<Vec<ContainerVolume>>>, pub wait: Output<Option<bool>>, pub wait_timeout: Output<Option<i32>>, pub working_dir: Output<Option<String>>,
}

Fields§

§attach: Output<Option<bool>>

If true attach to the container after its creation and waits the end of its execution. Defaults to false.

§capabilities: Output<Option<ContainerCapabilities>>

Add or drop certrain linux capabilities.

§cgroupns_mode: Output<Option<String>>

Cgroup namespace mode to use for the container. Possible values are: private, host.

§command: Output<Option<Vec<String>>>

The command to use to start the container. For example, to run /usr/bin/myprogram -f baz.conf set the command to be ["/usr/bin/myprogram","-f","baz.con"].

§container_read_refresh_timeout_milliseconds: Output<Option<i32>>

The total number of milliseconds to wait for the container to reach status ‘running’

§cpu_set: Output<Option<String>>

A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. 0-1.

§cpu_shares: Output<Option<i32>>

CPU shares (relative weight) for the container.

§destroy_grace_seconds: Output<Option<i32>>

If defined will attempt to stop the container before destroying. Container will be destroyed after n seconds or on successful stop.

§devices: Output<Option<Vec<ContainerDevice>>>

Bind devices to the container.

§dns: Output<Option<Vec<String>>>

DNS servers to use.

§dns_opts: Output<Option<Vec<String>>>

DNS options used by the DNS provider(s), see resolv.conf documentation for valid list of options.

§dns_searches: Output<Option<Vec<String>>>

DNS search domains that are used when bare unqualified hostnames are used inside of the container.

§domainname: Output<Option<String>>

Domain name of the container.

§entrypoints: Output<Option<Vec<String>>>

The command to use as the Entrypoint for the container. The Entrypoint allows you to configure a container to run as an executable. For example, to run /usr/bin/myprogram when starting a container, set the entrypoint to be "/usr/bin/myprogra"].

§envs: Output<Option<Vec<String>>>

Environment variables to set in the form of KEY=VALUE, e.g. DEBUG=0

§gpus: Output<Option<String>>

GPU devices to add to the container. Currently, only the value all is supported. Passing any other value will result in unexpected behavior.

§group_adds: Output<Option<Vec<String>>>

Additional groups for the container user

§healthcheck: Output<Option<ContainerHealthcheck>>

A test to perform to check that the container is healthy

§hostname: Output<Option<String>>

Hostname of the container.

§hosts: Output<Option<Vec<ContainerHost>>>

Hostname to add

§image: Output<String>

The ID of the image to back this container. The easiest way to get this value is to use the docker.RemoteImage resource as is shown in the example.

§init: Output<Option<bool>>

Configured whether an init process should be injected for this container. If unset this will default to the dockerd defaults.

§ipc_mode: Output<Option<String>>

IPC sharing mode for the container. Possible values are: none, private, shareable, container:<name|id> or host.

§labels: Output<Option<Vec<ContainerLabel>>>

User-defined key/value metadata.

§log_driver: Output<Option<String>>

The logging driver to use for the container.

§log_opts: Output<Option<HashMap<String, String>>>

Key/value pairs to use as options for the logging driver.

§logs: Output<Option<bool>>

Save the container logs (attach must be enabled). Defaults to false.

§max_retry_count: Output<Option<i32>>

The maximum amount of times to an attempt a restart when restart is set to ‘on-failure’.

§memory: Output<Option<i32>>

The memory limit for the container in MBs.

§memory_swap: Output<Option<i32>>

The total memory limit (memory + swap) for the container in MBs. This setting may compute to -1 after pulumi up if the target host doesn’t support memory swap, when that is the case docker will use a soft limitation.

§mounts: Output<Option<Vec<ContainerMount>>>

Specification for mounts to be added to containers created as part of the service.

§must_run: Output<Option<bool>>

If true, then the Docker container will be kept running. If false, then as long as the container exists, Terraform assumes it is successful. Defaults to true.

§name: Output<Option<String>>

The name or id of the network to use. You can use name or id attribute from a docker.Network resource.

§network_mode: Output<Option<String>>

Network mode of the container.

§networks_advanced: Output<Option<Vec<ContainerNetworksAdvanced>>>

The networks the container is attached to

§pid_mode: Output<Option<String>>

he PID (Process) Namespace mode for the container. Either container:<name|id> or host.

§ports: Output<Option<Vec<ContainerPort>>>

Publish a container’s port(s) to the host.

§privileged: Output<Option<bool>>

If true, the container runs in privileged mode.

§publish_all_ports: Output<Option<bool>>

Publish all ports of the container.

§read_only: Output<Option<bool>>

Whether the mount should be read-only.

§remove_volumes: Output<Option<bool>>

If true, it will remove anonymous volumes associated with the container. Defaults to true.

§restart: Output<Option<String>>

The restart policy for the container. Must be one of ‘no’, ‘on-failure’, ‘always’, ‘unless-stopped’. Defaults to no.

§rm: Output<Option<bool>>

If true, then the container will be automatically removed when it exits. Defaults to false.

§runtime: Output<Option<String>>

Runtime to use for the container.

§security_opts: Output<Option<Vec<String>>>

List of string values to customize labels for MLS systems, such as SELinux. See https://docs.docker.com/engine/reference/run/#security-configuration.

§shm_size: Output<Option<i32>>

Size of /dev/shm in MBs.

§start: Output<Option<bool>>

If true, then the Docker container will be started after creation. If false, then the container is only created. Defaults to true.

§stdin_open: Output<Option<bool>>

If true, keep STDIN open even if not attached (docker run -i). Defaults to false.

§stop_signal: Output<Option<String>>

Signal to stop a container (default SIGTERM).

§stop_timeout: Output<Option<i32>>

Timeout (in seconds) to stop a container.

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

Key/value pairs for the storage driver options, e.g. size: 120G

§sysctls: Output<Option<HashMap<String, String>>>

A map of kernel parameters (sysctls) to set in the container.

§tmpfs: Output<Option<HashMap<String, String>>>

A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.

§tty: Output<Option<bool>>

If true, allocate a pseudo-tty (docker run -t). Defaults to false.

§ulimits: Output<Option<Vec<ContainerUlimit>>>

Ulimit options to add.

§uploads: Output<Option<Vec<ContainerUpload>>>

Specifies files to upload to the container before starting it. Only one of content or content_base64 can be set and at least one of them has to be set.

§user: Output<Option<String>>

User used for run the first process. Format is user or user:group which user and group can be passed literraly or by name.

§userns_mode: Output<Option<String>>

Sets the usernamespace mode for the container when usernamespace remapping option is enabled.

§volumes: Output<Option<Vec<ContainerVolume>>>

Spec for mounting volumes in the container.

§wait: Output<Option<bool>>

If true, then the Docker container is waited for being healthy state after creation. If false, then the container health state is not checked. Defaults to false.

§wait_timeout: Output<Option<i32>>

The timeout in seconds to wait the container to be healthy after creation. Defaults to 60.

§working_dir: Output<Option<String>>

The working directory for commands to run in.

Implementations§

source§

impl ContainerArgs

source

pub fn builder() -> ContainerArgsBuilder

Create an instance of ContainerArgs using the builder syntax

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

§

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

§

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.