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§

Trait Implementations§

source§

impl Debug for ServiceTaskSpecContainerSpec

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ServiceTaskSpecContainerSpec

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ServiceTaskSpecContainerSpec

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,