TaskSpecContainerSpec

constructor(image: String? = null, labels: Map<String, String>? = null, command: List<String>? = null, args: List<String>? = null, hostname: String? = null, env: List<String>? = null, dir: String? = null, user: String? = null, groups: List<String>? = null, privileges: TaskSpecContainerSpecPrivileges? = null, TTY: Boolean? = null, openStdin: Boolean? = null, readOnly: Boolean? = null, mounts: List<Mount>? = null, stopSignal: String? = null, stopGracePeriod: Long? = null, healthCheck: HealthConfig? = null, hosts: List<String>? = null, dnSConfig: TaskSpecContainerSpecDNSConfig? = null, secrets: List<TaskSpecContainerSpecSecretsInner>? = null, oomScoreAdj: Long? = null, configs: List<TaskSpecContainerSpecConfigsInner>? = null, isolation: TaskSpecContainerSpec.Isolation? = null, init: Boolean? = null, sysctls: Map<String, String>? = null, capabilityAdd: List<String>? = null, capabilityDrop: List<String>? = null, ulimits: List<ResourcesUlimitsInner>? = null)

Parameters

image

The image name to use for the container

labels

User-defined key/value data.

command

The command to be run in the image.

args

Arguments to the command.

hostname

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

env

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

dir

The working directory for commands to run in.

user

The user inside the container.

groups

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

privileges
TTY

Whether a pseudo-TTY should be allocated.

openStdin

Open stdin

readOnly

Mount the container's root filesystem as read only.

mounts

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

stopSignal

Signal to stop the container.

stopGracePeriod

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

healthCheck
hosts

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

dnSConfig
secrets

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

oomScoreAdj

An integer value containing the score given to the container in order to tune OOM killer preferences.

configs

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

isolation

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

`init`

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.

sysctls

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.

capabilityAdd

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

capabilityDrop

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

ulimits

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