Docker Task

Docker Task nodes create a task definition for running Docker containers on ephemeral, non-dedicated server instances using AWS Fargate. This is in contrast to Docker Server nodes that run Docker Containers on a pool of compute resources provided by a Docker Cluster.

Warning: AWS Fargate, which Docker Task nodes use, is currently only available in the US-East-1 (N. Virginia) region. Stacks with Docker Task nodes will deploy successfully in other regions, but attempts to use the AWS API to run tasks will fail with an error.

Tasks are executed by invoking the ECS RunTask action using a taskDefinitionArn value. For example, a Docker task could transcode a video file from one Object Store into multiple different formats that are then uploaded to another Object Store. The taskDefinitionArn value can be specified in either the STACKERY_PORTS environment variable when a Function node output port is connected to a Docker Task input port, or by referencing the taskDefinitionArn property value in a Function’s environment variables.

Docker images can be pulled from either public registries or private registries hosted in AWS Elastic Container Registry.

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 needed to run each instance of the task. One CPU is equivalent to 1,024 compute units.

Memory

The amount of memory, in MB, needed to run each instance of the task.

Environment Variables

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

Stackery Port Data

When connecting a wire between the output of a Function node to the input of a Docker Task node, the STACKERY_PORTS environment variable for the Function node will contain the following information in JSON form:

Property Type Description
type string The type of the connected resource. Always set to dockerTask.
id string The Stackery Docker Task node’s ID. Example: abcd1234.
name string The Stackery Docker Task node’s name. Example: Batch Processor.
taskDefinitionArn string The AWS ARN of the Docker Task Definition. Example: arn:aws:ecs:us-west-2:123456789012:task-definition/stackery-98237489374-DockerTaskabcd1234-9OSD78D7AS:1
vpcSubnets string Comma-separated list of AWS VPC subnets to run the Docker task within. Example: subnet-abcd1234,subnet-efgh5678


See Function Output Port Connections for more details on the STACKERY_PORTS environment variable.

Referenceable Properties

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

Property Value Example
taskDefinitionArn 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.