pub struct TaskSpecContainerSpecInlineItem {
Show 27 fields pub args: Option<Vec<String, Global>>, pub capability_add: Option<Vec<String, Global>>, pub capability_drop: Option<Vec<String, Global>>, pub command: Option<Vec<String, Global>>, pub configs: Option<Vec<TaskSpecContainerSpecInlineItemConfigsInlineItem, Global>>, pub dns_config: Option<TaskSpecContainerSpecInlineItemDnsConfigInlineItem>, pub dir: Option<String>, pub env: Option<Vec<String, Global>>, pub groups: Option<Vec<String, Global>>, pub health_check: Option<HealthConfig>, pub hostname: Option<String>, pub hosts: Option<Vec<String, Global>>, pub image: Option<String>, pub init: Option<bool>, pub isolation: Option<String>, pub labels: Option<HashMap<String, String, RandomState>>, pub mounts: Option<Vec<Mount, Global>>, pub open_stdin: Option<bool>, pub privileges: Option<TaskSpecContainerSpecInlineItemPrivilegesInlineItem>, pub read_only: Option<bool>, pub secrets: Option<Vec<TaskSpecContainerSpecInlineItemSecretsInlineItem, Global>>, pub stop_grace_period: Option<i64>, pub stop_signal: Option<String>, pub sysctls: Option<HashMap<String, String, RandomState>>, pub tty: Option<bool>, pub ulimits: Option<Vec<TaskSpecContainerSpecInlineItemUlimitsInlineItem, Global>>, pub user: Option<String>,
}
Expand description

Container spec for the service.


Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. PluginSpec is only used when the Runtime field is set to plugin. NetworkAttachmentSpec is used when the Runtime field is set to attachment.

Fields

args: Option<Vec<String, Global>>

Arguments to the command.

capability_add: Option<Vec<String, Global>>

A list of kernel capabilities to add to the default set for the container.

capability_drop: Option<Vec<String, Global>>

A list of kernel capabilities to drop from the default set for the container.

command: Option<Vec<String, Global>>

The command to be run in the image.

configs: Option<Vec<TaskSpecContainerSpecInlineItemConfigsInlineItem, Global>>

Configs contains references to zero or more configs that will be exposed to the service.

dns_config: Option<TaskSpecContainerSpecInlineItemDnsConfigInlineItem>

Specification for DNS related configurations in resolver configuration file (resolv.conf).

dir: Option<String>

The working directory for commands to run in.

env: Option<Vec<String, Global>>

A list of environment variables in the form VAR=value.

groups: Option<Vec<String, Global>>

A list of additional groups that the container process will run as.

health_check: Option<HealthConfig>hostname: Option<String>

The hostname to use for the container, as a valid RFC 1123 hostname.

hosts: Option<Vec<String, Global>>

A list of hostname/IP mappings to add to the container’s hosts file. The format of extra hosts is specified in the hosts(5) man page:

IP_address canonical_hostname [aliases...]
image: Option<String>

The image name to use for the container

init: Option<bool>

Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used.

isolation: Option<String>

Isolation technology of the containers running the service. (Windows only)

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

User-defined key/value data.

mounts: Option<Vec<Mount, Global>>

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

open_stdin: Option<bool>

Open stdin

privileges: Option<TaskSpecContainerSpecInlineItemPrivilegesInlineItem>

Security options for the container

read_only: Option<bool>

Mount the container’s root filesystem as read only.

secrets: Option<Vec<TaskSpecContainerSpecInlineItemSecretsInlineItem, Global>>

Secrets contains references to zero or more secrets that will be exposed to the service.

stop_grace_period: Option<i64>

Amount of time to wait for the container to terminate before forcefully killing it.

stop_signal: Option<String>

Signal to stop the container.

sysctls: Option<HashMap<String, String, RandomState>>

Set kernel namedspaced parameters (sysctls) in the container. The Sysctls option on services accepts the same sysctls as the are supported on containers. Note that while the same sysctls are supported, no guarantees or checks are made about their suitability for a clustered environment, and it’s up to the user to determine whether a given sysctl will work properly in a Service.

tty: Option<bool>

Whether a pseudo-TTY should be allocated.

ulimits: Option<Vec<TaskSpecContainerSpecInlineItemUlimitsInlineItem, Global>>

A list of resource limits to set in the container. For example: {"Name": "nofile", "Soft": 1024, "Hard": 2048}

user: Option<String>

The user inside the container.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more