DockerImage

class aws_cdk.aws_stepfunctions_tasks.DockerImage

Bases: object

Creates IDockerImage instances.

stability :stability: experimental

__init__()

Initialize self. See help(type(self)) for accurate signature.

Return type

None

Methods

bind(task)

Called when the image is used by a SageMaker task.

Parameters

task (ISageMakerTask) –

stability :stability: experimental

Return type

DockerImageConfig

Static Methods

classmethod from_asset(scope, id, *, directory, build_args=None, repository_name=None, target=None, exclude=None, follow=None)

Reference a Docker image that is provided as an Asset in the current app.

Parameters
  • scope (Construct) – the scope in which to create the Asset.

  • id (str) – the ID for the asset in the construct tree.

  • props – the configuration props of the asset.

  • directory (str) – The directory where the Dockerfile is stored.

  • build_args (Optional[Mapping[str, str]]) – Build args to pass to the docker build command. Since Docker build arguments are resolved before deployment, keys and values cannot refer to unresolved tokens (such as lambda.functionArn or queue.queueUrl). Default: - no build args are passed

  • repository_name (Optional[str]) – ECR repository name. Specify this property if you need to statically address the image, e.g. from a Kubernetes Pod. Note, this is only the repository name, without the registry and the tag parts. Default: - automatically derived from the asset’s ID.

  • target (Optional[str]) – Docker target to build to. Default: - no target

  • exclude (Optional[List[str]]) – Glob patterns to exclude from the copy. Default: nothing is excluded

  • follow (Optional[FollowMode]) – A strategy for how to handle symlinks. Default: Never

stability :stability: experimental

Return type

DockerImage

classmethod from_ecr_repository(repository, tag=None)

Reference a Docker image stored in an ECR repository.

Parameters
  • repository (IRepository) – the ECR repository where the image is hosted.

  • tag (Optional[str]) – an optional tag.

stability :stability: experimental

Return type

DockerImage

classmethod from_json_expression(expression, allow_any_ecr_image_pull=None)

Reference a Docker image which URI is obtained from the task’s input.

Parameters
  • expression (str) – the JSON path expression with the task input.

  • allow_any_ecr_image_pull (Optional[bool]) – whether ECR access should be permitted (set to false if the image will never be in ECR).

stability :stability: experimental

Return type

DockerImage

classmethod from_registry(image_uri)

Reference a Docker image by it’s URI.

When referencing ECR images, prefer using inEcr.

Parameters

image_uri (str) – the URI to the docker image.

stability :stability: experimental

Return type

DockerImage