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 toattachment
.
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§
source§impl Clone for TaskSpecContainerSpecInlineItem
impl Clone for TaskSpecContainerSpecInlineItem
source§fn clone(&self) -> TaskSpecContainerSpecInlineItem
fn clone(&self) -> TaskSpecContainerSpecInlineItem
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'de> Deserialize<'de> for TaskSpecContainerSpecInlineItem
impl<'de> Deserialize<'de> for TaskSpecContainerSpecInlineItem
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<TaskSpecContainerSpecInlineItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<TaskSpecContainerSpecInlineItem, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl PartialEq<TaskSpecContainerSpecInlineItem> for TaskSpecContainerSpecInlineItem
impl PartialEq<TaskSpecContainerSpecInlineItem> for TaskSpecContainerSpecInlineItem
source§fn eq(&self, other: &TaskSpecContainerSpecInlineItem) -> bool
fn eq(&self, other: &TaskSpecContainerSpecInlineItem) -> bool
self
and other
values to be equal, and is used
by ==
.