Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

Service

Import

Docker service can be imported using the long id, e.g. for a service with the short id 55ba873dd

 $ pulumi import docker:index/service:Service foo $(docker service inspect -f {{.ID}} 55b)

Create a Service Resource

new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);
def Service(resource_name: str, opts: Optional[ResourceOptions] = None, auth: Optional[ServiceAuthArgs] = None, converge_config: Optional[ServiceConvergeConfigArgs] = None, endpoint_spec: Optional[ServiceEndpointSpecArgs] = None, labels: Optional[Sequence[ServiceLabelArgs]] = None, mode: Optional[ServiceModeArgs] = None, name: Optional[str] = None, rollback_config: Optional[ServiceRollbackConfigArgs] = None, task_spec: Optional[ServiceTaskSpecArgs] = None, update_config: Optional[ServiceUpdateConfigArgs] = None)
func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)
public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Service Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Service resource accepts the following input properties:

TaskSpec ServiceTaskSpecArgs

See TaskSpec below for details.

Auth ServiceAuthArgs

See Auth below for details.

ConvergeConfig ServiceConvergeConfigArgs

See Converge Config below for details.

EndpointSpec ServiceEndpointSpecArgs

See EndpointSpec below for details.

Labels List<ServiceLabelArgs>

See Labels below for details.

Mode ServiceModeArgs

See Mode below for details.

Name string

The name of the Docker service.

RollbackConfig ServiceRollbackConfigArgs

See RollbackConfig below for details.

UpdateConfig ServiceUpdateConfigArgs

See UpdateConfig below for details.

TaskSpec ServiceTaskSpec

See TaskSpec below for details.

Auth ServiceAuth

See Auth below for details.

ConvergeConfig ServiceConvergeConfig

See Converge Config below for details.

EndpointSpec ServiceEndpointSpec

See EndpointSpec below for details.

Labels []ServiceLabel

See Labels below for details.

Mode ServiceMode

See Mode below for details.

Name string

The name of the Docker service.

RollbackConfig ServiceRollbackConfig

See RollbackConfig below for details.

UpdateConfig ServiceUpdateConfig

See UpdateConfig below for details.

taskSpec ServiceTaskSpec

See TaskSpec below for details.

auth ServiceAuth

See Auth below for details.

convergeConfig ServiceConvergeConfig

See Converge Config below for details.

endpointSpec ServiceEndpointSpec

See EndpointSpec below for details.

labels ServiceLabel[]

See Labels below for details.

mode ServiceMode

See Mode below for details.

name string

The name of the Docker service.

rollbackConfig ServiceRollbackConfig

See RollbackConfig below for details.

updateConfig ServiceUpdateConfig

See UpdateConfig below for details.

task_spec ServiceTaskSpecArgs

See TaskSpec below for details.

auth ServiceAuthArgs

See Auth below for details.

converge_config ServiceConvergeConfigArgs

See Converge Config below for details.

endpoint_spec ServiceEndpointSpecArgs

See EndpointSpec below for details.

labels Sequence[ServiceLabelArgs]

See Labels below for details.

mode ServiceModeArgs

See Mode below for details.

name str

The name of the Docker service.

rollback_config ServiceRollbackConfigArgs

See RollbackConfig below for details.

update_config ServiceUpdateConfigArgs

See UpdateConfig below for details.

Outputs

All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Service Resource

Get an existing Service resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ServiceState, opts?: CustomResourceOptions): Service
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, auth: Optional[ServiceAuthArgs] = None, converge_config: Optional[ServiceConvergeConfigArgs] = None, endpoint_spec: Optional[ServiceEndpointSpecArgs] = None, labels: Optional[Sequence[ServiceLabelArgs]] = None, mode: Optional[ServiceModeArgs] = None, name: Optional[str] = None, rollback_config: Optional[ServiceRollbackConfigArgs] = None, task_spec: Optional[ServiceTaskSpecArgs] = None, update_config: Optional[ServiceUpdateConfigArgs] = None) -> Service
func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Auth ServiceAuthArgs

See Auth below for details.

ConvergeConfig ServiceConvergeConfigArgs

See Converge Config below for details.

EndpointSpec ServiceEndpointSpecArgs

See EndpointSpec below for details.

Labels List<ServiceLabelArgs>

See Labels below for details.

Mode ServiceModeArgs

See Mode below for details.

Name string

The name of the Docker service.

RollbackConfig ServiceRollbackConfigArgs

See RollbackConfig below for details.

TaskSpec ServiceTaskSpecArgs

See TaskSpec below for details.

UpdateConfig ServiceUpdateConfigArgs

See UpdateConfig below for details.

Auth ServiceAuth

See Auth below for details.

ConvergeConfig ServiceConvergeConfig

See Converge Config below for details.

EndpointSpec ServiceEndpointSpec

See EndpointSpec below for details.

Labels []ServiceLabel

See Labels below for details.

Mode ServiceMode

See Mode below for details.

Name string

The name of the Docker service.

RollbackConfig ServiceRollbackConfig

See RollbackConfig below for details.

TaskSpec ServiceTaskSpec

See TaskSpec below for details.

UpdateConfig ServiceUpdateConfig

See UpdateConfig below for details.

auth ServiceAuth

See Auth below for details.

convergeConfig ServiceConvergeConfig

See Converge Config below for details.

endpointSpec ServiceEndpointSpec

See EndpointSpec below for details.

labels ServiceLabel[]

See Labels below for details.

mode ServiceMode

See Mode below for details.

name string

The name of the Docker service.

rollbackConfig ServiceRollbackConfig

See RollbackConfig below for details.

taskSpec ServiceTaskSpec

See TaskSpec below for details.

updateConfig ServiceUpdateConfig

See UpdateConfig below for details.

auth ServiceAuthArgs

See Auth below for details.

converge_config ServiceConvergeConfigArgs

See Converge Config below for details.

endpoint_spec ServiceEndpointSpecArgs

See EndpointSpec below for details.

labels Sequence[ServiceLabelArgs]

See Labels below for details.

mode ServiceModeArgs

See Mode below for details.

name str

The name of the Docker service.

rollback_config ServiceRollbackConfigArgs

See RollbackConfig below for details.

task_spec ServiceTaskSpecArgs

See TaskSpec below for details.

update_config ServiceUpdateConfigArgs

See UpdateConfig below for details.

Supporting Types

ServiceAuth

ServerAddress string

The address of the registry server

Password string

The password to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_PASS is also be checked.

Username string

The username to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_USER is also be checked.

ServerAddress string

The address of the registry server

Password string

The password to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_PASS is also be checked.

Username string

The username to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_USER is also be checked.

serverAddress string

The address of the registry server

password string

The password to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_PASS is also be checked.

username string

The username to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_USER is also be checked.

server_address str

The address of the registry server

password str

The password to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_PASS is also be checked.

username str

The username to use for authenticating to the registry. If this is blank, the DOCKER_REGISTRY_USER is also be checked.

ServiceConvergeConfig

Delay string

Time between each the check to check docker endpoint (ms|s|m|h). For example, to check if all tasks are up when a service is created, or to check if all tasks are successfully updated on an update. Default: 7s.

Timeout string

The timeout of the service to reach the desired state (s|m). Default: 3m.

Delay string

Time between each the check to check docker endpoint (ms|s|m|h). For example, to check if all tasks are up when a service is created, or to check if all tasks are successfully updated on an update. Default: 7s.

Timeout string

The timeout of the service to reach the desired state (s|m). Default: 3m.

delay string

Time between each the check to check docker endpoint (ms|s|m|h). For example, to check if all tasks are up when a service is created, or to check if all tasks are successfully updated on an update. Default: 7s.

timeout string

The timeout of the service to reach the desired state (s|m). Default: 3m.

delay str

Time between each the check to check docker endpoint (ms|s|m|h). For example, to check if all tasks are up when a service is created, or to check if all tasks are successfully updated on an update. Default: 7s.

timeout str

The timeout of the service to reach the desired state (s|m). Default: 3m.

ServiceEndpointSpec

Mode string

The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

Ports List<ServiceEndpointSpecPortArgs>

See Ports below for details.

Mode string

The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

Ports []ServiceEndpointSpecPort

See Ports below for details.

mode string

The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

ports ServiceEndpointSpecPort[]

See Ports below for details.

mode str

The mode of resolution to use for internal load balancing between tasks. (vip|dnsrr). Default: vip.

ports Sequence[ServiceEndpointSpecPortArgs]

See Ports below for details.

ServiceEndpointSpecPort

TargetPort int

Port inside the container.

Name string

The name of the Docker service.

Protocol string

Protocol that can be used over this port: tcp|udp|sctp. Default: tcp.

PublishMode string

Represents the mode in which the port is to be published: ingress|host

PublishedPort int

The port on the swarm hosts. If not set the value of target_port will be used.

TargetPort int

Port inside the container.

Name string

The name of the Docker service.

Protocol string

Protocol that can be used over this port: tcp|udp|sctp. Default: tcp.

PublishMode string

Represents the mode in which the port is to be published: ingress|host

PublishedPort int

The port on the swarm hosts. If not set the value of target_port will be used.

targetPort number

Port inside the container.

name string

The name of the Docker service.

protocol string

Protocol that can be used over this port: tcp|udp|sctp. Default: tcp.

publishMode string

Represents the mode in which the port is to be published: ingress|host

publishedPort number

The port on the swarm hosts. If not set the value of target_port will be used.

target_port int

Port inside the container.

name str

The name of the Docker service.

protocol str

Protocol that can be used over this port: tcp|udp|sctp. Default: tcp.

publish_mode str

Represents the mode in which the port is to be published: ingress|host

published_port int

The port on the swarm hosts. If not set the value of target_port will be used.

ServiceLabel

Label string

Name of the label

Value string

Value of the label

Label string

Name of the label

Value string

Value of the label

label string

Name of the label

value string

Value of the label

label str

Name of the label

value str

Value of the label

ServiceMode

Global bool

set it to true to run the service in the global mode

Replicated ServiceModeReplicatedArgs

, which contains atm only the amount of replicas

Global bool

set it to true to run the service in the global mode

Replicated ServiceModeReplicated

, which contains atm only the amount of replicas

global boolean

set it to true to run the service in the global mode

replicated ServiceModeReplicated

, which contains atm only the amount of replicas

global_ bool

set it to true to run the service in the global mode

replicated ServiceModeReplicatedArgs

, which contains atm only the amount of replicas

ServiceModeReplicated

replicas number

ServiceRollbackConfig

Delay string

Delay between restart attempts (ms|s|m|h) all tasks are up when a service is created, or to check if all tasks are successfully updated on an update. Default: 7s.

FailureAction string

Action on update failure: pause|continue|rollback.

MaxFailureRatio string

The failure rate to tolerate during an update as float. Important: the floatneed to be wrapped in a string to avoid internal casting and precision errors.

Monitor string

Duration after each task update to monitor for failure (ns|us|ms|s|m|h)

Order string

Update order either ‘stop-first’ or ‘start-first’.

Parallelism int

The maximum number of tasks to be updated in one iteration simultaneously (0 to update all at once).

Delay string

Delay between restart attempts (ms|s|m|h) all tasks are up when a service is created, or to check if all tasks are successfully updated on an update. Default: 7s.

FailureAction string

Action on update failure: pause|continue|rollback.

MaxFailureRatio string

The failure rate to tolerate during an update as float. Important: the floatneed to be wrapped in a string to avoid internal casting and precision errors.

Monitor string

Duration after each task update to monitor for failure (ns|us|ms|s|m|h)

Order string

Update order either ‘stop-first’ or ‘start-first’.

Parallelism int

The maximum number of tasks to be updated in one iteration simultaneously (0 to update all at once).

delay string

Delay between restart attempts (ms|s|m|h) all tasks are up when a service is created, or to check if all tasks are successfully updated on an update. Default: 7s.

failureAction string

Action on update failure: pause|continue|rollback.

maxFailureRatio string

The failure rate to tolerate during an update as float. Important: the floatneed to be wrapped in a string to avoid internal casting and precision errors.

monitor string

Duration after each task update to monitor for failure (ns|us|ms|s|m|h)

order string

Update order either ‘stop-first’ or ‘start-first’.

parallelism number

The maximum number of tasks to be updated in one iteration simultaneously (0 to update all at once).

delay str

Delay between restart attempts (ms|s|m|h) all tasks are up when a service is created, or to check if all tasks are successfully updated on an update. Default: 7s.

failure_action str

Action on update failure: pause|continue|rollback.

max_failure_ratio str

The failure rate to tolerate during an update as float. Important: the floatneed to be wrapped in a string to avoid internal casting and precision errors.

monitor str

Duration after each task update to monitor for failure (ns|us|ms|s|m|h)

order str

Update order either ‘stop-first’ or ‘start-first’.

parallelism int

The maximum number of tasks to be updated in one iteration simultaneously (0 to update all at once).

ServiceTaskSpec

ContainerSpec ServiceTaskSpecContainerSpecArgs

See ContainerSpec below for details.

ForceUpdate int

A counter that triggers an update even if no relevant parameters have been changed. See Docker Spec.

LogDriver ServiceTaskSpecLogDriverArgs

See Log Driver below for details.

Networks List<string>

Ids of the networks in which the container will be put in.

Placement ServiceTaskSpecPlacementArgs

See Placement below for details.

Resources ServiceTaskSpecResourcesArgs

See Resources below for details.

RestartPolicy ServiceTaskSpecRestartPolicyArgs

See Restart Policy below for details.

Runtime string

Runtime is the type of runtime specified for the task executor. See Docker Runtime.

ContainerSpec ServiceTaskSpecContainerSpec

See ContainerSpec below for details.

ForceUpdate int

A counter that triggers an update even if no relevant parameters have been changed. See Docker Spec.

LogDriver ServiceTaskSpecLogDriver

See Log Driver below for details.

Networks []string

Ids of the networks in which the container will be put in.

Placement ServiceTaskSpecPlacement

See Placement below for details.

Resources ServiceTaskSpecResources

See Resources below for details.

RestartPolicy ServiceTaskSpecRestartPolicy

See Restart Policy below for details.

Runtime string

Runtime is the type of runtime specified for the task executor. See Docker Runtime.

containerSpec ServiceTaskSpecContainerSpec

See ContainerSpec below for details.

forceUpdate number

A counter that triggers an update even if no relevant parameters have been changed. See Docker Spec.

logDriver ServiceTaskSpecLogDriver

See Log Driver below for details.

networks string[]

Ids of the networks in which the container will be put in.

placement ServiceTaskSpecPlacement

See Placement below for details.

resources ServiceTaskSpecResources

See Resources below for details.

restartPolicy ServiceTaskSpecRestartPolicy

See Restart Policy below for details.

runtime string

Runtime is the type of runtime specified for the task executor. See Docker Runtime.

container_spec ServiceTaskSpecContainerSpecArgs

See ContainerSpec below for details.

force_update int

A counter that triggers an update even if no relevant parameters have been changed. See Docker Spec.

log_driver ServiceTaskSpecLogDriverArgs

See Log Driver below for details.

networks Sequence[str]

Ids of the networks in which the container will be put in.

placement ServiceTaskSpecPlacementArgs

See Placement below for details.

resources ServiceTaskSpecResourcesArgs

See Resources below for details.

restart_policy ServiceTaskSpecRestartPolicyArgs

See Restart Policy below for details.

runtime str

Runtime is the type of runtime specified for the task executor. See Docker Runtime.

ServiceTaskSpecContainerSpec

Image string

The image used to create the Docker service.

Args List<string>

Arguments to the command.

Commands List<string>

The command to be run in the image.

Configs List<ServiceTaskSpecContainerSpecConfigArgs>

See Configs below for details.

Dir string

The working directory for commands to run in.

DnsConfig ServiceTaskSpecContainerSpecDnsConfigArgs

See DNS Config below for details.

Env Dictionary<string, string>

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

Groups List<string>

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

Healthcheck ServiceTaskSpecContainerSpecHealthcheckArgs

See Healthcheck below for details.

Hostname string

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

Hosts List<ServiceTaskSpecContainerSpecHostArgs>
Isolation string

Isolation technology of the containers running the service. (Windows only). Valid values are: default|process|hyperv

Labels List<ServiceTaskSpecContainerSpecLabelArgs>

See Labels below for details.

Mounts List<ServiceTaskSpecContainerSpecMountArgs>

See Mounts below for details.

Privileges ServiceTaskSpecContainerSpecPrivilegesArgs

See Privileges below for details.

ReadOnly bool

Mount the container’s root filesystem as read only.

Secrets List<ServiceTaskSpecContainerSpecSecretArgs>

See Secrets below for details.

StopGracePeriod string

Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h).

StopSignal string

Signal to stop the container.

User string

The user inside the container.

Image string

The image used to create the Docker service.

Args []string

Arguments to the command.

Commands []string

The command to be run in the image.

Configs []ServiceTaskSpecContainerSpecConfig

See Configs below for details.

Dir string

The working directory for commands to run in.

DnsConfig ServiceTaskSpecContainerSpecDnsConfig

See DNS Config below for details.

Env map[string]string

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

Groups []string

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

Healthcheck ServiceTaskSpecContainerSpecHealthcheck

See Healthcheck below for details.

Hostname string

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

Hosts []ServiceTaskSpecContainerSpecHost
Isolation string

Isolation technology of the containers running the service. (Windows only). Valid values are: default|process|hyperv

Labels []ServiceTaskSpecContainerSpecLabel

See Labels below for details.

Mounts []ServiceTaskSpecContainerSpecMount

See Mounts below for details.

Privileges ServiceTaskSpecContainerSpecPrivileges

See Privileges below for details.

ReadOnly bool

Mount the container’s root filesystem as read only.

Secrets []ServiceTaskSpecContainerSpecSecret

See Secrets below for details.

StopGracePeriod string

Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h).

StopSignal string

Signal to stop the container.

User string

The user inside the container.

image string

The image used to create the Docker service.

args string[]

Arguments to the command.

commands string[]

The command to be run in the image.

configs ServiceTaskSpecContainerSpecConfig[]

See Configs below for details.

dir string

The working directory for commands to run in.

dnsConfig ServiceTaskSpecContainerSpecDnsConfig

See DNS Config below for details.

env {[key: string]: string}

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

groups string[]

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

healthcheck ServiceTaskSpecContainerSpecHealthcheck

See Healthcheck below for details.

hostname string

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

hosts ServiceTaskSpecContainerSpecHost[]
isolation string

Isolation technology of the containers running the service. (Windows only). Valid values are: default|process|hyperv

labels ServiceTaskSpecContainerSpecLabel[]

See Labels below for details.

mounts ServiceTaskSpecContainerSpecMount[]

See Mounts below for details.

privileges ServiceTaskSpecContainerSpecPrivileges

See Privileges below for details.

readOnly boolean

Mount the container’s root filesystem as read only.

secrets ServiceTaskSpecContainerSpecSecret[]

See Secrets below for details.

stopGracePeriod string

Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h).

stopSignal string

Signal to stop the container.

user string

The user inside the container.

image str

The image used to create the Docker service.

args Sequence[str]

Arguments to the command.

commands Sequence[str]

The command to be run in the image.

configs Sequence[ServiceTaskSpecContainerSpecConfigArgs]

See Configs below for details.

dir str

The working directory for commands to run in.

dns_config ServiceTaskSpecContainerSpecDnsConfigArgs

See DNS Config below for details.

env Mapping[str, str]

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

groups Sequence[str]

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

healthcheck ServiceTaskSpecContainerSpecHealthcheckArgs

See Healthcheck below for details.

hostname str

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

hosts Sequence[ServiceTaskSpecContainerSpecHostArgs]
isolation str

Isolation technology of the containers running the service. (Windows only). Valid values are: default|process|hyperv

labels Sequence[ServiceTaskSpecContainerSpecLabelArgs]

See Labels below for details.

mounts Sequence[ServiceTaskSpecContainerSpecMountArgs]

See Mounts below for details.

privileges ServiceTaskSpecContainerSpecPrivilegesArgs

See Privileges below for details.

read_only bool

Mount the container’s root filesystem as read only.

secrets Sequence[ServiceTaskSpecContainerSpecSecretArgs]

See Secrets below for details.

stop_grace_period str

Amount of time to wait for the container to terminate before forcefully removing it (ms|s|m|h).

stop_signal str

Signal to stop the container.

user str

The user inside the container.

ServiceTaskSpecContainerSpecConfig

ConfigId string

ConfigID represents the ID of the specific config.

FileName string

Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json

ConfigName string

The name of the config that this references, but internally it is just provided for lookup/display purposes

FileGid string

Represents the file GID. Defaults: 0

FileMode int

Represents the FileMode of the file. Defaults: 0444

FileUid string

Represents the file UID. Defaults: 0

ConfigId string

ConfigID represents the ID of the specific config.

FileName string

Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json

ConfigName string

The name of the config that this references, but internally it is just provided for lookup/display purposes

FileGid string

Represents the file GID. Defaults: 0

FileMode int

Represents the FileMode of the file. Defaults: 0444

FileUid string

Represents the file UID. Defaults: 0

configId string

ConfigID represents the ID of the specific config.

fileName string

Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json

configName string

The name of the config that this references, but internally it is just provided for lookup/display purposes

fileGid string

Represents the file GID. Defaults: 0

fileMode number

Represents the FileMode of the file. Defaults: 0444

fileUid string

Represents the file UID. Defaults: 0

config_id str

ConfigID represents the ID of the specific config.

file_name str

Represents the final filename in the filesystem. The specific target file that the config data is written within the docker container, e.g. /root/config/config.json

config_name str

The name of the config that this references, but internally it is just provided for lookup/display purposes

file_gid str

Represents the file GID. Defaults: 0

file_mode int

Represents the FileMode of the file. Defaults: 0444

file_uid str

Represents the file UID. Defaults: 0

ServiceTaskSpecContainerSpecDnsConfig

Nameservers List<string>

The IP addresses of the name servers, for example, 8.8.8.8

Options List<string>

A list of internal resolver variables to be modified, for example, debug, ndots:3

Searches List<string>

A search list for host-name lookup.

Nameservers []string

The IP addresses of the name servers, for example, 8.8.8.8

Options []string

A list of internal resolver variables to be modified, for example, debug, ndots:3

Searches []string

A search list for host-name lookup.

nameservers string[]

The IP addresses of the name servers, for example, 8.8.8.8

options string[]

A list of internal resolver variables to be modified, for example, debug, ndots:3

searches string[]

A search list for host-name lookup.

nameservers Sequence[str]

The IP addresses of the name servers, for example, 8.8.8.8

options Sequence[str]

A list of internal resolver variables to be modified, for example, debug, ndots:3

searches Sequence[str]

A search list for host-name lookup.

ServiceTaskSpecContainerSpecHealthcheck

Tests List<string>

Command to run to check health. For example, to run curl -f http://localhost/health set the command to be ["CMD", "curl", "-f", "http://localhost/health"].

Interval string

Time between running the check (ms|s|m|h). Default: 0s.

Retries int

Consecutive failures needed to report unhealthy. Default: 0.

StartPeriod string

Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Default: 0s.

Timeout string

Maximum time to allow one check to run (ms|s|m|h). Default: 0s.

Tests []string

Command to run to check health. For example, to run curl -f http://localhost/health set the command to be ["CMD", "curl", "-f", "http://localhost/health"].

Interval string

Time between running the check (ms|s|m|h). Default: 0s.

Retries int

Consecutive failures needed to report unhealthy. Default: 0.

StartPeriod string

Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Default: 0s.

Timeout string

Maximum time to allow one check to run (ms|s|m|h). Default: 0s.

tests string[]

Command to run to check health. For example, to run curl -f http://localhost/health set the command to be ["CMD", "curl", "-f", "http://localhost/health"].

interval string

Time between running the check (ms|s|m|h). Default: 0s.

retries number

Consecutive failures needed to report unhealthy. Default: 0.

startPeriod string

Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Default: 0s.

timeout string

Maximum time to allow one check to run (ms|s|m|h). Default: 0s.

tests Sequence[str]

Command to run to check health. For example, to run curl -f http://localhost/health set the command to be ["CMD", "curl", "-f", "http://localhost/health"].

interval str

Time between running the check (ms|s|m|h). Default: 0s.

retries int

Consecutive failures needed to report unhealthy. Default: 0.

start_period str

Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Default: 0s.

timeout str

Maximum time to allow one check to run (ms|s|m|h). Default: 0s.

ServiceTaskSpecContainerSpecHost

Host string

A list of hostname/IP mappings to add to the container’s hosts file.

Ip string

The ip

Host string

A list of hostname/IP mappings to add to the container’s hosts file.

Ip string

The ip

host string

A list of hostname/IP mappings to add to the container’s hosts file.

ip string

The ip

host str

A list of hostname/IP mappings to add to the container’s hosts file.

ip str

The ip

ServiceTaskSpecContainerSpecLabel

Label string

Name of the label

Value string

Value of the label

Label string

Name of the label

Value string

Value of the label

label string

Name of the label

value string

Value of the label

label str

Name of the label

value str

Value of the label

ServiceTaskSpecContainerSpecMount

Target string

The container path.

Type string

SELinux type label

BindOptions ServiceTaskSpecContainerSpecMountBindOptionsArgs

Optional configuration for the bind type.

ReadOnly bool

Mount the container’s root filesystem as read only.

Source string

The mount source (e.g., a volume name, a host path)

TmpfsOptions ServiceTaskSpecContainerSpecMountTmpfsOptionsArgs

Optional configuration for the tmpf type.

VolumeOptions ServiceTaskSpecContainerSpecMountVolumeOptionsArgs

Optional configuration for the volume type.

Target string

The container path.

Type string

SELinux type label

BindOptions ServiceTaskSpecContainerSpecMountBindOptions

Optional configuration for the bind type.

ReadOnly bool

Mount the container’s root filesystem as read only.

Source string

The mount source (e.g., a volume name, a host path)

TmpfsOptions ServiceTaskSpecContainerSpecMountTmpfsOptions

Optional configuration for the tmpf type.

VolumeOptions ServiceTaskSpecContainerSpecMountVolumeOptions

Optional configuration for the volume type.

target string

The container path.

type string

SELinux type label

bindOptions ServiceTaskSpecContainerSpecMountBindOptions

Optional configuration for the bind type.

readOnly boolean

Mount the container’s root filesystem as read only.

source string

The mount source (e.g., a volume name, a host path)

tmpfsOptions ServiceTaskSpecContainerSpecMountTmpfsOptions

Optional configuration for the tmpf type.

volumeOptions ServiceTaskSpecContainerSpecMountVolumeOptions

Optional configuration for the volume type.

target str

The container path.

type str

SELinux type label

bind_options ServiceTaskSpecContainerSpecMountBindOptionsArgs

Optional configuration for the bind type.

read_only bool

Mount the container’s root filesystem as read only.

source str

The mount source (e.g., a volume name, a host path)

tmpfs_options ServiceTaskSpecContainerSpecMountTmpfsOptionsArgs

Optional configuration for the tmpf type.

volume_options ServiceTaskSpecContainerSpecMountVolumeOptionsArgs

Optional configuration for the volume type.

ServiceTaskSpecContainerSpecMountBindOptions

Propagation string

A propagation mode with the value.

Propagation string

A propagation mode with the value.

propagation string

A propagation mode with the value.

propagation str

A propagation mode with the value.

ServiceTaskSpecContainerSpecMountTmpfsOptions

Mode int

See Mode below for details.

SizeBytes int

The size for the tmpfs mount in bytes.

Mode int

See Mode below for details.

SizeBytes int

The size for the tmpfs mount in bytes.

mode number

See Mode below for details.

sizeBytes number

The size for the tmpfs mount in bytes.

mode int

See Mode below for details.

size_bytes int

The size for the tmpfs mount in bytes.

ServiceTaskSpecContainerSpecMountVolumeOptions

DriverName string
DriverOptions Dictionary<string, string>
Labels List<ServiceTaskSpecContainerSpecMountVolumeOptionsLabelArgs>

See Labels below for details.

NoCopy bool

Whether to populate volume with data from the target.

DriverName string
DriverOptions map[string]string
Labels []ServiceTaskSpecContainerSpecMountVolumeOptionsLabel

See Labels below for details.

NoCopy bool

Whether to populate volume with data from the target.

driverName string
driverOptions {[key: string]: string}
labels ServiceTaskSpecContainerSpecMountVolumeOptionsLabel[]

See Labels below for details.

noCopy boolean

Whether to populate volume with data from the target.

driver_name str
driver_options Mapping[str, str]
labels Sequence[ServiceTaskSpecContainerSpecMountVolumeOptionsLabelArgs]

See Labels below for details.

no_copy bool

Whether to populate volume with data from the target.

ServiceTaskSpecContainerSpecMountVolumeOptionsLabel

Label string

Name of the label

Value string

Value of the label

Label string

Name of the label

Value string

Value of the label

label string

Name of the label

value string

Value of the label

label str

Name of the label

value str

Value of the label

ServiceTaskSpecContainerSpecPrivileges

ServiceTaskSpecContainerSpecPrivilegesCredentialSpec

File string

Load credential spec from this file.

Registry string

Load credential spec from this value in the Windows registry.

File string

Load credential spec from this file.

Registry string

Load credential spec from this value in the Windows registry.

file string

Load credential spec from this file.

registry string

Load credential spec from this value in the Windows registry.

file str

Load credential spec from this file.

registry str

Load credential spec from this value in the Windows registry.

ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext

Disable bool

Disable SELinux

Level string

SELinux level label

Role string

SELinux role label

Type string

SELinux type label

User string

The user inside the container.

Disable bool

Disable SELinux

Level string

SELinux level label

Role string

SELinux role label

Type string

SELinux type label

User string

The user inside the container.

disable boolean

Disable SELinux

level string

SELinux level label

role string

SELinux role label

type string

SELinux type label

user string

The user inside the container.

disable bool

Disable SELinux

level str

SELinux level label

role str

SELinux role label

type str

SELinux type label

user str

The user inside the container.

ServiceTaskSpecContainerSpecSecret

FileName string

Represents the final filename in the filesystem. The specific target file that the secret data is written within the docker container, e.g. /root/secret/secret.json

SecretId string

ConfigID represents the ID of the specific secret.

FileGid string

Represents the file GID. Defaults: 0

FileMode int

Represents the FileMode of the file. Defaults: 0444

FileUid string

Represents the file UID. Defaults: 0

SecretName string

The name of the secret that this references, but internally it is just provided for lookup/display purposes

FileName string

Represents the final filename in the filesystem. The specific target file that the secret data is written within the docker container, e.g. /root/secret/secret.json

SecretId string

ConfigID represents the ID of the specific secret.

FileGid string

Represents the file GID. Defaults: 0

FileMode int

Represents the FileMode of the file. Defaults: 0444

FileUid string

Represents the file UID. Defaults: 0

SecretName string

The name of the secret that this references, but internally it is just provided for lookup/display purposes

fileName string

Represents the final filename in the filesystem. The specific target file that the secret data is written within the docker container, e.g. /root/secret/secret.json

secretId string

ConfigID represents the ID of the specific secret.

fileGid string

Represents the file GID. Defaults: 0

fileMode number

Represents the FileMode of the file. Defaults: 0444

fileUid string

Represents the file UID. Defaults: 0

secretName string

The name of the secret that this references, but internally it is just provided for lookup/display purposes

file_name str

Represents the final filename in the filesystem. The specific target file that the secret data is written within the docker container, e.g. /root/secret/secret.json

secret_id str

ConfigID represents the ID of the specific secret.

file_gid str

Represents the file GID. Defaults: 0

file_mode int

Represents the FileMode of the file. Defaults: 0444

file_uid str

Represents the file UID. Defaults: 0

secret_name str

The name of the secret that this references, but internally it is just provided for lookup/display purposes

ServiceTaskSpecLogDriver

Name string

The logging driver to use. Either (none|json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs).

Options Dictionary<string, string>

The options for the logging driver, e.g.

Name string

The logging driver to use. Either (none|json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs).

Options map[string]string

The options for the logging driver, e.g.

name string

The logging driver to use. Either (none|json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs).

options {[key: string]: string}

The options for the logging driver, e.g.

name str

The logging driver to use. Either (none|json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs).

options Mapping[str, str]

The options for the logging driver, e.g.

ServiceTaskSpecPlacement

Constraints List<string>

An array of constraints. e.g.: node.role==manager

MaxReplicas int

Maximum number of replicas for per node (default value is 0, which is unlimited)

Platforms List<ServiceTaskSpecPlacementPlatformArgs>

Platforms stores all the platforms that the service’s image can run on

Prefs List<string>

Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager

Constraints []string

An array of constraints. e.g.: node.role==manager

MaxReplicas int

Maximum number of replicas for per node (default value is 0, which is unlimited)

Platforms []ServiceTaskSpecPlacementPlatform

Platforms stores all the platforms that the service’s image can run on

Prefs []string

Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager

constraints string[]

An array of constraints. e.g.: node.role==manager

maxReplicas number

Maximum number of replicas for per node (default value is 0, which is unlimited)

platforms ServiceTaskSpecPlacementPlatform[]

Platforms stores all the platforms that the service’s image can run on

prefs string[]

Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager

constraints Sequence[str]

An array of constraints. e.g.: node.role==manager

max_replicas int

Maximum number of replicas for per node (default value is 0, which is unlimited)

platforms Sequence[ServiceTaskSpecPlacementPlatformArgs]

Platforms stores all the platforms that the service’s image can run on

prefs Sequence[str]

Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: spread=node.role.manager

ServiceTaskSpecPlacementPlatform

Architecture string

The architecture, e.g., amd64

Os string

The operation system, e.g., linux

Architecture string

The architecture, e.g., amd64

Os string

The operation system, e.g., linux

architecture string

The architecture, e.g., amd64

os string

The operation system, e.g., linux

architecture str

The architecture, e.g., amd64

os str

The operation system, e.g., linux

ServiceTaskSpecResources

Limits ServiceTaskSpecResourcesLimitsArgs

Describes the resources which can be advertised by a node and requested by a task.

Reservation ServiceTaskSpecResourcesReservationArgs

An object describing the resources which can be advertised by a node and requested by a task.

Limits ServiceTaskSpecResourcesLimits

Describes the resources which can be advertised by a node and requested by a task.

Reservation ServiceTaskSpecResourcesReservation

An object describing the resources which can be advertised by a node and requested by a task.

limits ServiceTaskSpecResourcesLimits

Describes the resources which can be advertised by a node and requested by a task.

reservation ServiceTaskSpecResourcesReservation

An object describing the resources which can be advertised by a node and requested by a task.

limits ServiceTaskSpecResourcesLimitsArgs

Describes the resources which can be advertised by a node and requested by a task.

reservation ServiceTaskSpecResourcesReservationArgs

An object describing the resources which can be advertised by a node and requested by a task.

ServiceTaskSpecResourcesLimits

GenericResources ServiceTaskSpecResourcesLimitsGenericResourcesArgs

User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)

MemoryBytes int

The amount of memory in bytes the container allocates

NanoCpus int

CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000

GenericResources ServiceTaskSpecResourcesLimitsGenericResources

User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)

MemoryBytes int

The amount of memory in bytes the container allocates

NanoCpus int

CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000

genericResources ServiceTaskSpecResourcesLimitsGenericResources

User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)

memoryBytes number

The amount of memory in bytes the container allocates

nanoCpus number

CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000

generic_resources ServiceTaskSpecResourcesLimitsGenericResourcesArgs

User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)

memory_bytes int

The amount of memory in bytes the container allocates

nano_cpus int

CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000

ServiceTaskSpecResourcesLimitsGenericResources

DiscreteResourcesSpecs List<string>

The Integer resources, delimited by =

NamedResourcesSpecs List<string>

The String resources, delimited by =

DiscreteResourcesSpecs []string

The Integer resources, delimited by =

NamedResourcesSpecs []string

The String resources, delimited by =

discreteResourcesSpecs string[]

The Integer resources, delimited by =

namedResourcesSpecs string[]

The String resources, delimited by =

discrete_resources_specs Sequence[str]

The Integer resources, delimited by =

named_resources_specs Sequence[str]

The String resources, delimited by =

ServiceTaskSpecResourcesReservation

GenericResources ServiceTaskSpecResourcesReservationGenericResourcesArgs

User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)

MemoryBytes int

The amount of memory in bytes the container allocates

NanoCpus int

CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000

GenericResources ServiceTaskSpecResourcesReservationGenericResources

User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)

MemoryBytes int

The amount of memory in bytes the container allocates

NanoCpus int

CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000

genericResources ServiceTaskSpecResourcesReservationGenericResources

User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)

memoryBytes number

The amount of memory in bytes the container allocates

nanoCpus number

CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000

generic_resources ServiceTaskSpecResourcesReservationGenericResourcesArgs

User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)

memory_bytes int

The amount of memory in bytes the container allocates

nano_cpus int

CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000

ServiceTaskSpecResourcesReservationGenericResources

DiscreteResourcesSpecs List<string>

The Integer resources, delimited by =

NamedResourcesSpecs List<string>

The String resources, delimited by =

DiscreteResourcesSpecs []string

The Integer resources, delimited by =

NamedResourcesSpecs []string

The String resources, delimited by =

discreteResourcesSpecs string[]

The Integer resources, delimited by =

namedResourcesSpecs string[]

The String resources, delimited by =

discrete_resources_specs Sequence[str]

The Integer resources, delimited by =

named_resources_specs Sequence[str]

The String resources, delimited by =

ServiceTaskSpecRestartPolicy

Condition string

Condition for restart: (none|on-failure|any)

Delay string

Delay between restart attempts (ms|s|m|h)

MaxAttempts int

Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)

Window string

The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h)

Condition string

Condition for restart: (none|on-failure|any)

Delay string

Delay between restart attempts (ms|s|m|h)

MaxAttempts int

Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)

Window string

The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h)

condition string

Condition for restart: (none|on-failure|any)

delay string

Delay between restart attempts (ms|s|m|h)

maxAttempts number

Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)

window string

The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h)

condition str

Condition for restart: (none|on-failure|any)

delay str

Delay between restart attempts (ms|s|m|h)

max_attempts int

Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)

window str

The time window used to evaluate the restart policy (default value is 0, which is unbounded) (ms|s|m|h)

ServiceUpdateConfig

Delay string

Delay between updates (ns|us|ms|s|m|h), e.g. 5s.

FailureAction string

Action on update failure: pause|continue|rollback.

MaxFailureRatio string

The failure rate to tolerate during an update as float. Important: the floatneed to be wrapped in a string to avoid internal casting and precision errors.

Monitor string

Duration after each task update to monitor for failure (ns|us|ms|s|m|h)

Order string

Update order either ‘stop-first’ or ‘start-first’.

Parallelism int

The maximum number of tasks to be updated in one iteration simultaneously (0 to update all at once).

Delay string

Delay between updates (ns|us|ms|s|m|h), e.g. 5s.

FailureAction string

Action on update failure: pause|continue|rollback.

MaxFailureRatio string

The failure rate to tolerate during an update as float. Important: the floatneed to be wrapped in a string to avoid internal casting and precision errors.

Monitor string

Duration after each task update to monitor for failure (ns|us|ms|s|m|h)

Order string

Update order either ‘stop-first’ or ‘start-first’.

Parallelism int

The maximum number of tasks to be updated in one iteration simultaneously (0 to update all at once).

delay string

Delay between updates (ns|us|ms|s|m|h), e.g. 5s.

failureAction string

Action on update failure: pause|continue|rollback.

maxFailureRatio string

The failure rate to tolerate during an update as float. Important: the floatneed to be wrapped in a string to avoid internal casting and precision errors.

monitor string

Duration after each task update to monitor for failure (ns|us|ms|s|m|h)

order string

Update order either ‘stop-first’ or ‘start-first’.

parallelism number

The maximum number of tasks to be updated in one iteration simultaneously (0 to update all at once).

delay str

Delay between updates (ns|us|ms|s|m|h), e.g. 5s.

failure_action str

Action on update failure: pause|continue|rollback.

max_failure_ratio str

The failure rate to tolerate during an update as float. Important: the floatneed to be wrapped in a string to avoid internal casting and precision errors.

monitor str

Duration after each task update to monitor for failure (ns|us|ms|s|m|h)

order str

Update order either ‘stop-first’ or ‘start-first’.

parallelism int

The maximum number of tasks to be updated in one iteration simultaneously (0 to update all at once).

Package Details

Repository
https://github.com/pulumi/pulumi-docker
License
Apache-2.0
Notes
This Pulumi package is based on the docker Terraform Provider.