Docker Service

Docker Service nodes create a service by running Docker containers on a pool of compute resources provided by a Docker Cluster.

Services support mapping exposed Docker container network ports to external resources. These ports may also be the targets of Load Balancer Nodes to provide high-throughput and high-availability services.

Services can also be executed as tasks by sending messages from Function nodes to Docker Service nodes. For example, a Docker service could transcode a video file from one Object Store into multiple different formats that are then uploaded to another Object Store.

Docker images can be pulled from both public and private registries. When pulling from private registries, registry credentials must be provided in the Docker Cluster Registry Credentials setting.

Message Formats

Input

Property Type Default Description
command Array undefined Docker command override. Example: ["ping", "google.com"]
env Object {} Environment variables. Values specified here will override values specified in the Docker Service Environment Variables setting. Example: {"FOO": "bar"}

Response

Property Type Description
taskId string ID of the created task

Settings

Name

A label used for the node in the canvas.

Docker Image

The repository and optional tag of the Docker image to run. Examples:

  • public/training
  • quay.io/mycompany/api#master

Compute Units

The number of compute units to reserve from the Docker Cluster for each instance of the service running on the cluster. One CPU is equivalent to 1,024 compute units.

Memory

The amount of memory, in MB, to reserve from the Docker Cluster for each instance of the service running on the cluster.

Container Port

An optional port to expose from the Docker container. The port will be exposed through a random available external port on the Docker Cluster instance that the Docker Service instance is running on. Connected Load Balancer Nodes will automatically target the port specified here.

Health Check Path

When a Load Balancer is attached to the Docker Service, this property specifies the HTTP request path used to monitor the health of the service.

Minimum Instances

The minimum number of Docker Service instances to keep running regardless of compute utilization.

Maximum Instances

The maximum number of Docker Service instances to run regardless of compute utilization.

Compute Scale In

The percentage threshold for utilization of Compute Units below which the number of Docker Service instances will be decreased.

Compute Scale Out

The percentage threshold for utilization of Compute Units above which the number of Docker Service instances will be increased.

Scale Percentage

When scaling in or out, how much to increase or decrease the number of Docker Service instances in the cluster by.

Environment Variables

A list of environment variable values provided to the Docker Service instances.

Referenceable Properties

The following properties may be referenced by Function and Docker Service nodes:

Property Value Example
id Cloud Service Identifier arn:aws:ecs:us-east-1:0123456789012:service/fufaskd8d229d
taskDefinitionId Docker Task Definition Cloud Service Identifier arn:aws:ecs:us-east-1:0123456789012:task-definition/8sdf7f2ol3s9

Try Stackery For Free

Gain control and visibility of your serverless operations from architecture design to application deployment and infrastructure monitoring.