pub struct ServiceTaskSpecContainerSpec {Show 21 fields
pub args: Box<Option<Vec<String>>>,
pub commands: Box<Option<Vec<String>>>,
pub configs: Box<Option<Vec<ServiceTaskSpecContainerSpecConfig>>>,
pub dir: Box<Option<String>>,
pub dns_config: Box<Option<ServiceTaskSpecContainerSpecDnsConfig>>,
pub env: Box<Option<HashMap<String, String>>>,
pub groups: Box<Option<Vec<String>>>,
pub healthcheck: Box<Option<ServiceTaskSpecContainerSpecHealthcheck>>,
pub hostname: Box<Option<String>>,
pub hosts: Box<Option<Vec<ServiceTaskSpecContainerSpecHost>>>,
pub image: Box<String>,
pub isolation: Box<Option<String>>,
pub labels: Box<Option<Vec<ServiceTaskSpecContainerSpecLabel>>>,
pub mounts: Box<Option<Vec<ServiceTaskSpecContainerSpecMount>>>,
pub privileges: Box<Option<ServiceTaskSpecContainerSpecPrivileges>>,
pub read_only: Box<Option<bool>>,
pub secrets: Box<Option<Vec<ServiceTaskSpecContainerSpecSecret>>>,
pub stop_grace_period: Box<Option<String>>,
pub stop_signal: Box<Option<String>>,
pub sysctl: Box<Option<HashMap<String, String>>>,
pub user: Box<Option<String>>,
}
Fields§
§args: Box<Option<Vec<String>>>
Arguments to the command
commands: Box<Option<Vec<String>>>
The command/entrypoint to be run in the image. According to the docker cli the override of the entrypoint is also passed to the command
property and there is no entrypoint
attribute in the ContainerSpec
of the service.
configs: Box<Option<Vec<ServiceTaskSpecContainerSpecConfig>>>
References to zero or more configs that will be exposed to the service
dir: Box<Option<String>>
The working directory for commands to run in
dns_config: Box<Option<ServiceTaskSpecContainerSpecDnsConfig>>
Specification for DNS related configurations in resolver configuration file (resolv.conf
)
env: Box<Option<HashMap<String, String>>>
A list of environment variables in the form VAR=“value”
groups: Box<Option<Vec<String>>>
A list of additional groups that the container process will run as
healthcheck: Box<Option<ServiceTaskSpecContainerSpecHealthcheck>>
A test to perform to check that the container is healthy
hostname: Box<Option<String>>
The hostname to use for the container, as a valid RFC 1123 hostname
hosts: Box<Option<Vec<ServiceTaskSpecContainerSpecHost>>>
A list of hostname/IP mappings to add to the container’s hosts file
image: Box<String>
The image name to use for the containers of the service, like nginx:1.17.6
. Also use the data-source or resource of docker.RemoteImage
with the repo_digest
or docker.RegistryImage
with the name
attribute for this, as shown in the examples.
isolation: Box<Option<String>>
Isolation technology of the containers running the service. (Windows only). Defaults to default
.
labels: Box<Option<Vec<ServiceTaskSpecContainerSpecLabel>>>
User-defined key/value metadata
mounts: Box<Option<Vec<ServiceTaskSpecContainerSpecMount>>>
Specification for mounts to be added to containers created as part of the service
privileges: Box<Option<ServiceTaskSpecContainerSpecPrivileges>>
Security options for the container
read_only: Box<Option<bool>>
Mount the container’s root filesystem as read only
secrets: Box<Option<Vec<ServiceTaskSpecContainerSpecSecret>>>
References to zero or more secrets that will be exposed to the service
stop_grace_period: Box<Option<String>>
Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h). If not specified or ‘0s’ the destroy will not check if all tasks/containers of the service terminate.
stop_signal: Box<Option<String>>
Signal to stop the container
sysctl: Box<Option<HashMap<String, String>>>
Sysctls config (Linux only)
user: Box<Option<String>>
The user inside the container
Implementations§
source§impl ServiceTaskSpecContainerSpec
impl ServiceTaskSpecContainerSpec
sourcepub fn builder() -> ServiceTaskSpecContainerSpecBuilder
pub fn builder() -> ServiceTaskSpecContainerSpecBuilder
Create an instance of ServiceTaskSpecContainerSpec
using the builder syntax