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:
- Task
Spec ServiceTask Spec Args See TaskSpec below for details.
- Auth
Service
Auth Args See Auth below for details.
- Converge
Config ServiceConverge Config Args See Converge Config below for details.
- Endpoint
Spec ServiceEndpoint Spec Args See EndpointSpec below for details.
- Labels
List<Service
Label Args> See Labels below for details.
- Mode
Service
Mode Args See Mode below for details.
- Name string
The name of the Docker service.
- Rollback
Config ServiceRollback Config Args See RollbackConfig below for details.
- Update
Config ServiceUpdate Config Args See UpdateConfig below for details.
- Task
Spec ServiceTask Spec See TaskSpec below for details.
- Auth
Service
Auth See Auth below for details.
- Converge
Config ServiceConverge Config See Converge Config below for details.
- Endpoint
Spec ServiceEndpoint Spec See EndpointSpec below for details.
- Labels
[]Service
Label See Labels below for details.
- Mode
Service
Mode See Mode below for details.
- Name string
The name of the Docker service.
- Rollback
Config ServiceRollback Config See RollbackConfig below for details.
- Update
Config ServiceUpdate Config See UpdateConfig below for details.
- task
Spec ServiceTask Spec See TaskSpec below for details.
- auth
Service
Auth See Auth below for details.
- converge
Config ServiceConverge Config See Converge Config below for details.
- endpoint
Spec ServiceEndpoint Spec See EndpointSpec below for details.
- labels
Service
Label[] See Labels below for details.
- mode
Service
Mode See Mode below for details.
- name string
The name of the Docker service.
- rollback
Config ServiceRollback Config See RollbackConfig below for details.
- update
Config ServiceUpdate Config See UpdateConfig below for details.
- task_
spec ServiceTask Spec Args See TaskSpec below for details.
- auth
Service
Auth Args See Auth below for details.
- converge_
config ServiceConverge Config Args See Converge Config below for details.
- endpoint_
spec ServiceEndpoint Spec Args See EndpointSpec below for details.
- labels
Sequence[Service
Label Args] See Labels below for details.
- mode
Service
Mode Args See Mode below for details.
- name str
The name of the Docker service.
- rollback_
config ServiceRollback Config Args See RollbackConfig below for details.
- update_
config ServiceUpdate Config Args 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
Service
Auth Args See Auth below for details.
- Converge
Config ServiceConverge Config Args See Converge Config below for details.
- Endpoint
Spec ServiceEndpoint Spec Args See EndpointSpec below for details.
- Labels
List<Service
Label Args> See Labels below for details.
- Mode
Service
Mode Args See Mode below for details.
- Name string
The name of the Docker service.
- Rollback
Config ServiceRollback Config Args See RollbackConfig below for details.
- Task
Spec ServiceTask Spec Args See TaskSpec below for details.
- Update
Config ServiceUpdate Config Args See UpdateConfig below for details.
- Auth
Service
Auth See Auth below for details.
- Converge
Config ServiceConverge Config See Converge Config below for details.
- Endpoint
Spec ServiceEndpoint Spec See EndpointSpec below for details.
- Labels
[]Service
Label See Labels below for details.
- Mode
Service
Mode See Mode below for details.
- Name string
The name of the Docker service.
- Rollback
Config ServiceRollback Config See RollbackConfig below for details.
- Task
Spec ServiceTask Spec See TaskSpec below for details.
- Update
Config ServiceUpdate Config See UpdateConfig below for details.
- auth
Service
Auth See Auth below for details.
- converge
Config ServiceConverge Config See Converge Config below for details.
- endpoint
Spec ServiceEndpoint Spec See EndpointSpec below for details.
- labels
Service
Label[] See Labels below for details.
- mode
Service
Mode See Mode below for details.
- name string
The name of the Docker service.
- rollback
Config ServiceRollback Config See RollbackConfig below for details.
- task
Spec ServiceTask Spec See TaskSpec below for details.
- update
Config ServiceUpdate Config See UpdateConfig below for details.
- auth
Service
Auth Args See Auth below for details.
- converge_
config ServiceConverge Config Args See Converge Config below for details.
- endpoint_
spec ServiceEndpoint Spec Args See EndpointSpec below for details.
- labels
Sequence[Service
Label Args] See Labels below for details.
- mode
Service
Mode Args See Mode below for details.
- name str
The name of the Docker service.
- rollback_
config ServiceRollback Config Args See RollbackConfig below for details.
- task_
spec ServiceTask Spec Args See TaskSpec below for details.
- update_
config ServiceUpdate Config Args See UpdateConfig below for details.
Supporting Types
ServiceAuth
- Server
Address 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 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 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<Service
Endpoint Spec Port Args> See Ports below for details.
- Mode string
The mode of resolution to use for internal load balancing between tasks.
(vip|dnsrr)
. Default:vip
.- Ports
[]Service
Endpoint Spec Port See Ports below for details.
- mode string
The mode of resolution to use for internal load balancing between tasks.
(vip|dnsrr)
. Default:vip
.- ports
Service
Endpoint Spec Port[] 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[Service
Endpoint Spec Port Args] See Ports below for details.
ServiceEndpointSpecPort
- Target
Port 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
.- Publish
Mode string 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.
- Target
Port 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
.- Publish
Mode string 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.
- target
Port 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
.- publish
Mode string Represents the mode in which the port is to be published:
ingress|host
- published
Port 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
ServiceMode
- Global bool
set it to
true
to run the service in the global mode- Replicated
Service
Mode Replicated Args , which contains atm only the amount of
replicas
- Global bool
set it to
true
to run the service in the global mode- Replicated
Service
Mode Replicated , which contains atm only the amount of
replicas
- global boolean
set it to
true
to run the service in the global mode- replicated
Service
Mode Replicated , which contains atm only the amount of
replicas
- global_ bool
set it to
true
to run the service in the global mode- replicated
Service
Mode Replicated Args , which contains atm only the amount of
replicas
ServiceModeReplicated
- Replicas int
- Replicas int
- replicas number
- replicas int
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
.- Failure
Action string Action on update failure:
pause|continue|rollback
.- Max
Failure stringRatio The failure rate to tolerate during an update as
float
. Important: thefloat
need to be wrapped in astring
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
.- Failure
Action string Action on update failure:
pause|continue|rollback
.- Max
Failure stringRatio The failure rate to tolerate during an update as
float
. Important: thefloat
need to be wrapped in astring
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
.- failure
Action string Action on update failure:
pause|continue|rollback
.- max
Failure stringRatio The failure rate to tolerate during an update as
float
. Important: thefloat
need to be wrapped in astring
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_ strratio The failure rate to tolerate during an update as
float
. Important: thefloat
need to be wrapped in astring
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
- Container
Spec ServiceTask Spec Container Spec Args 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 ServiceTask Spec Log Driver Args See Log Driver below for details.
- Networks List<string>
Ids of the networks in which the container will be put in.
- Placement
Service
Task Spec Placement Args See Placement below for details.
- Resources
Service
Task Spec Resources Args See Resources below for details.
- Restart
Policy ServiceTask Spec Restart Policy Args See Restart Policy below for details.
- Runtime string
Runtime is the type of runtime specified for the task executor. See Docker Runtime.
- Container
Spec ServiceTask Spec Container Spec 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 ServiceTask Spec Log Driver See Log Driver below for details.
- Networks []string
Ids of the networks in which the container will be put in.
- Placement
Service
Task Spec Placement See Placement below for details.
- Resources
Service
Task Spec Resources See Resources below for details.
- Restart
Policy ServiceTask Spec Restart Policy See Restart Policy below for details.
- Runtime string
Runtime is the type of runtime specified for the task executor. See Docker Runtime.
- container
Spec ServiceTask Spec Container Spec See ContainerSpec below for details.
- force
Update number A counter that triggers an update even if no relevant parameters have been changed. See Docker Spec.
- log
Driver ServiceTask Spec Log Driver See Log Driver below for details.
- networks string[]
Ids of the networks in which the container will be put in.
- placement
Service
Task Spec Placement See Placement below for details.
- resources
Service
Task Spec Resources See Resources below for details.
- restart
Policy ServiceTask Spec Restart Policy See Restart Policy below for details.
- runtime string
Runtime is the type of runtime specified for the task executor. See Docker Runtime.
- container_
spec ServiceTask Spec Container Spec Args 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 ServiceTask Spec Log Driver Args See Log Driver below for details.
- networks Sequence[str]
Ids of the networks in which the container will be put in.
- placement
Service
Task Spec Placement Args See Placement below for details.
- resources
Service
Task Spec Resources Args See Resources below for details.
- restart_
policy ServiceTask Spec Restart Policy Args 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<Service
Task Spec Container Spec Config Args> See Configs below for details.
- Dir string
The working directory for commands to run in.
- Dns
Config ServiceTask Spec Container Spec Dns Config Args 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
Service
Task Spec Container Spec Healthcheck Args See Healthcheck below for details.
- Hostname string
The hostname to use for the container, as a valid RFC 1123 hostname.
- Hosts
List<Service
Task Spec Container Spec Host Args> - Isolation string
Isolation technology of the containers running the service. (Windows only). Valid values are:
default|process|hyperv
- Labels
List<Service
Task Spec Container Spec Label Args> See Labels below for details.
- Mounts
List<Service
Task Spec Container Spec Mount Args> See Mounts below for details.
- Privileges
Service
Task Spec Container Spec Privileges Args See Privileges below for details.
- Read
Only bool Mount the container’s root filesystem as read only.
- Secrets
List<Service
Task Spec Container Spec Secret Args> See Secrets below for details.
- Stop
Grace stringPeriod Amount of time to wait for the container to terminate before forcefully removing it
(ms|s|m|h)
.- Stop
Signal 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
[]Service
Task Spec Container Spec Config See Configs below for details.
- Dir string
The working directory for commands to run in.
- Dns
Config ServiceTask Spec Container Spec Dns Config 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
Service
Task Spec Container Spec Healthcheck See Healthcheck below for details.
- Hostname string
The hostname to use for the container, as a valid RFC 1123 hostname.
- Hosts
[]Service
Task Spec Container Spec Host - Isolation string
Isolation technology of the containers running the service. (Windows only). Valid values are:
default|process|hyperv
- Labels
[]Service
Task Spec Container Spec Label See Labels below for details.
- Mounts
[]Service
Task Spec Container Spec Mount See Mounts below for details.
- Privileges
Service
Task Spec Container Spec Privileges See Privileges below for details.
- Read
Only bool Mount the container’s root filesystem as read only.
- Secrets
[]Service
Task Spec Container Spec Secret See Secrets below for details.
- Stop
Grace stringPeriod Amount of time to wait for the container to terminate before forcefully removing it
(ms|s|m|h)
.- Stop
Signal 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
Service
Task Spec Container Spec Config[] See Configs below for details.
- dir string
The working directory for commands to run in.
- dns
Config ServiceTask Spec Container Spec Dns Config 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
Service
Task Spec Container Spec Healthcheck See Healthcheck below for details.
- hostname string
The hostname to use for the container, as a valid RFC 1123 hostname.
- hosts
Service
Task Spec Container Spec Host[] - isolation string
Isolation technology of the containers running the service. (Windows only). Valid values are:
default|process|hyperv
- labels
Service
Task Spec Container Spec Label[] See Labels below for details.
- mounts
Service
Task Spec Container Spec Mount[] See Mounts below for details.
- privileges
Service
Task Spec Container Spec Privileges See Privileges below for details.
- read
Only boolean Mount the container’s root filesystem as read only.
- secrets
Service
Task Spec Container Spec Secret[] See Secrets below for details.
- stop
Grace stringPeriod Amount of time to wait for the container to terminate before forcefully removing it
(ms|s|m|h)
.- stop
Signal 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[Service
Task Spec Container Spec Config Args] See Configs below for details.
- dir str
The working directory for commands to run in.
- dns_
config ServiceTask Spec Container Spec Dns Config Args 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
Service
Task Spec Container Spec Healthcheck Args See Healthcheck below for details.
- hostname str
The hostname to use for the container, as a valid RFC 1123 hostname.
- hosts
Sequence[Service
Task Spec Container Spec Host Args] - isolation str
Isolation technology of the containers running the service. (Windows only). Valid values are:
default|process|hyperv
- labels
Sequence[Service
Task Spec Container Spec Label Args] See Labels below for details.
- mounts
Sequence[Service
Task Spec Container Spec Mount Args] See Mounts below for details.
- privileges
Service
Task Spec Container Spec Privileges Args See Privileges below for details.
- read_
only bool Mount the container’s root filesystem as read only.
- secrets
Sequence[Service
Task Spec Container Spec Secret Args] See Secrets below for details.
- stop_
grace_ strperiod 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
- Config
Id string ConfigID represents the ID of the specific config.
- File
Name 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
- Config
Name string The name of the config that this references, but internally it is just provided for lookup/display purposes
- File
Gid string Represents the file GID. Defaults:
0
- File
Mode int Represents the FileMode of the file. Defaults:
0444
- File
Uid string Represents the file UID. Defaults:
0
- Config
Id string ConfigID represents the ID of the specific config.
- File
Name 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
- Config
Name string The name of the config that this references, but internally it is just provided for lookup/display purposes
- File
Gid string Represents the file GID. Defaults:
0
- File
Mode int Represents the FileMode of the file. Defaults:
0444
- File
Uid string Represents the file UID. Defaults:
0
- config
Id string ConfigID represents the ID of the specific config.
- file
Name 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
- config
Name string The name of the config that this references, but internally it is just provided for lookup/display purposes
- file
Gid string Represents the file GID. Defaults:
0
- file
Mode number Represents the FileMode of the file. Defaults:
0444
- file
Uid 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
.- Start
Period 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
.- Start
Period 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
.- start
Period 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
ServiceTaskSpecContainerSpecLabel
ServiceTaskSpecContainerSpecMount
- Target string
The container path.
- Type string
SELinux type label
- Bind
Options ServiceTask Spec Container Spec Mount Bind Options Args Optional configuration for the
bind
type.- Read
Only bool Mount the container’s root filesystem as read only.
- Source string
The mount source (e.g., a volume name, a host path)
- Tmpfs
Options ServiceTask Spec Container Spec Mount Tmpfs Options Args Optional configuration for the
tmpf
type.- Volume
Options ServiceTask Spec Container Spec Mount Volume Options Args Optional configuration for the
volume
type.
- Target string
The container path.
- Type string
SELinux type label
- Bind
Options ServiceTask Spec Container Spec Mount Bind Options Optional configuration for the
bind
type.- Read
Only bool Mount the container’s root filesystem as read only.
- Source string
The mount source (e.g., a volume name, a host path)
- Tmpfs
Options ServiceTask Spec Container Spec Mount Tmpfs Options Optional configuration for the
tmpf
type.- Volume
Options ServiceTask Spec Container Spec Mount Volume Options Optional configuration for the
volume
type.
- target string
The container path.
- type string
SELinux type label
- bind
Options ServiceTask Spec Container Spec Mount Bind Options Optional configuration for the
bind
type.- read
Only boolean Mount the container’s root filesystem as read only.
- source string
The mount source (e.g., a volume name, a host path)
- tmpfs
Options ServiceTask Spec Container Spec Mount Tmpfs Options Optional configuration for the
tmpf
type.- volume
Options ServiceTask Spec Container Spec Mount Volume Options Optional configuration for the
volume
type.
- target str
The container path.
- type str
SELinux type label
- bind_
options ServiceTask Spec Container Spec Mount Bind Options Args 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 ServiceTask Spec Container Spec Mount Tmpfs Options Args Optional configuration for the
tmpf
type.- volume_
options ServiceTask Spec Container Spec Mount Volume Options Args 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.
- size_
bytes int The size for the tmpfs mount in bytes.
ServiceTaskSpecContainerSpecMountVolumeOptions
- Driver
Name string - Driver
Options Dictionary<string, string> - Labels
List<Service
Task Spec Container Spec Mount Volume Options Label Args> See Labels below for details.
- No
Copy bool Whether to populate volume with data from the target.
- Driver
Name string - Driver
Options map[string]string - Labels
[]Service
Task Spec Container Spec Mount Volume Options Label See Labels below for details.
- No
Copy bool Whether to populate volume with data from the target.
- driver
Name string - driver
Options {[key: string]: string} - labels
Service
Task Spec Container Spec Mount Volume Options Label[] See Labels below for details.
- no
Copy boolean Whether to populate volume with data from the target.
- driver_
name str - driver_
options Mapping[str, str] - labels
Sequence[Service
Task Spec Container Spec Mount Volume Options Label Args] See Labels below for details.
- no_
copy bool Whether to populate volume with data from the target.
ServiceTaskSpecContainerSpecMountVolumeOptionsLabel
ServiceTaskSpecContainerSpecPrivileges
- Credential
Spec ServiceTask Spec Container Spec Privileges Credential Spec Args For managed service account (Windows only)
- Se
Linux ServiceContext Task Spec Container Spec Privileges Se Linux Context Args SELinux labels of the container
- Credential
Spec ServiceTask Spec Container Spec Privileges Credential Spec For managed service account (Windows only)
- Se
Linux ServiceContext Task Spec Container Spec Privileges Se Linux Context SELinux labels of the container
- credential
Spec ServiceTask Spec Container Spec Privileges Credential Spec For managed service account (Windows only)
- se
Linux ServiceContext Task Spec Container Spec Privileges Se Linux Context SELinux labels of the container
- credential_
spec ServiceTask Spec Container Spec Privileges Credential Spec Args For managed service account (Windows only)
- se_
linux_ Servicecontext Task Spec Container Spec Privileges Se Linux Context Args SELinux labels of the container
ServiceTaskSpecContainerSpecPrivilegesCredentialSpec
ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext
ServiceTaskSpecContainerSpecSecret
- File
Name 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
- Secret
Id string ConfigID represents the ID of the specific secret.
- File
Gid string Represents the file GID. Defaults:
0
- File
Mode int Represents the FileMode of the file. Defaults:
0444
- File
Uid string Represents the file UID. Defaults:
0
- Secret
Name string The name of the secret that this references, but internally it is just provided for lookup/display purposes
- File
Name 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
- Secret
Id string ConfigID represents the ID of the specific secret.
- File
Gid string Represents the file GID. Defaults:
0
- File
Mode int Represents the FileMode of the file. Defaults:
0444
- File
Uid string Represents the file UID. Defaults:
0
- Secret
Name string The name of the secret that this references, but internally it is just provided for lookup/display purposes
- file
Name 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
- secret
Id string ConfigID represents the ID of the specific secret.
- file
Gid string Represents the file GID. Defaults:
0
- file
Mode number Represents the FileMode of the file. Defaults:
0444
- file
Uid string Represents the file UID. Defaults:
0
- secret
Name 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
ServiceTaskSpecPlacement
- Constraints List<string>
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
List<Service
Task Spec Placement Platform Args> 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
- Max
Replicas int Maximum number of replicas for per node (default value is 0, which is unlimited)
- Platforms
[]Service
Task Spec Placement Platform 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
- max
Replicas number Maximum number of replicas for per node (default value is 0, which is unlimited)
- platforms
Service
Task Spec Placement Platform[] 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[Service
Task Spec Placement Platform Args] 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
Service
Task Spec Resources Limits Args Describes the resources which can be advertised by a node and requested by a task.
- Reservation
Service
Task Spec Resources Reservation Args An object describing the resources which can be advertised by a node and requested by a task.
- Limits
Service
Task Spec Resources Limits Describes the resources which can be advertised by a node and requested by a task.
- Reservation
Service
Task Spec Resources Reservation An object describing the resources which can be advertised by a node and requested by a task.
- limits
Service
Task Spec Resources Limits Describes the resources which can be advertised by a node and requested by a task.
- reservation
Service
Task Spec Resources Reservation An object describing the resources which can be advertised by a node and requested by a task.
- limits
Service
Task Spec Resources Limits Args Describes the resources which can be advertised by a node and requested by a task.
- reservation
Service
Task Spec Resources Reservation Args An object describing the resources which can be advertised by a node and requested by a task.
ServiceTaskSpecResourcesLimits
- Generic
Resources ServiceTask Spec Resources Limits Generic Resources Args 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
- Generic
Resources ServiceTask Spec Resources Limits Generic Resources 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
- generic
Resources ServiceTask Spec Resources Limits Generic Resources User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)
- memory
Bytes number The amount of memory in bytes the container allocates
- nano
Cpus number CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
- generic_
resources ServiceTask Spec Resources Limits Generic Resources Args 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
- Discrete
Resources List<string>Specs The Integer resources, delimited by
=
- Named
Resources List<string>Specs The String resources, delimited by
=
- Discrete
Resources []stringSpecs The Integer resources, delimited by
=
- Named
Resources []stringSpecs The String resources, delimited by
=
- discrete
Resources string[]Specs The Integer resources, delimited by
=
- named
Resources string[]Specs The String resources, delimited by
=
- discrete_
resources_ Sequence[str]specs The Integer resources, delimited by
=
- named_
resources_ Sequence[str]specs The String resources, delimited by
=
ServiceTaskSpecResourcesReservation
- Generic
Resources ServiceTask Spec Resources Reservation Generic Resources Args 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
- Generic
Resources ServiceTask Spec Resources Reservation Generic Resources 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
- generic
Resources ServiceTask Spec Resources Reservation Generic Resources User-defined resources can be either Integer resources (e.g, SSD=3) or String resources (e.g, GPU=UUID1)
- memory
Bytes number The amount of memory in bytes the container allocates
- nano
Cpus number CPU shares in units of 1/1e9 (or 10^-9) of the CPU. Should be at least 1000000
- generic_
resources ServiceTask Spec Resources Reservation Generic Resources Args 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
- Discrete
Resources List<string>Specs The Integer resources, delimited by
=
- Named
Resources List<string>Specs The String resources, delimited by
=
- Discrete
Resources []stringSpecs The Integer resources, delimited by
=
- Named
Resources []stringSpecs The String resources, delimited by
=
- discrete
Resources string[]Specs The Integer resources, delimited by
=
- named
Resources string[]Specs The String resources, delimited by
=
- discrete_
resources_ Sequence[str]specs The Integer resources, delimited by
=
- named_
resources_ Sequence[str]specs 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)
- Max
Attempts 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)
- Max
Attempts 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)
- max
Attempts 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
.- Failure
Action string Action on update failure:
pause|continue|rollback
.- Max
Failure stringRatio The failure rate to tolerate during an update as
float
. Important: thefloat
need to be wrapped in astring
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
.- Failure
Action string Action on update failure:
pause|continue|rollback
.- Max
Failure stringRatio The failure rate to tolerate during an update as
float
. Important: thefloat
need to be wrapped in astring
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
.- failure
Action string Action on update failure:
pause|continue|rollback
.- max
Failure stringRatio The failure rate to tolerate during an update as
float
. Important: thefloat
need to be wrapped in astring
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_ strratio The failure rate to tolerate during an update as
float
. Important: thefloat
need to be wrapped in astring
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.