DockerImageAssetOptions

class aws_cdk.aws_ecr_assets.DockerImageAssetOptions(*, exclude=None, follow=None, extra_hash=None, build_args=None, file=None, repository_name=None, target=None)

Bases: aws_cdk.assets.FingerprintOptions

__init__(*, exclude=None, follow=None, extra_hash=None, build_args=None, file=None, repository_name=None, target=None)

Options for DockerImageAsset.

Parameters
  • 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

  • extra_hash (Optional[str]) – Extra information to encode into the fingerprint (e.g. build instructions and other inputs). Default: - hash is only based on source content

  • 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

  • file (Optional[str]) – Path to the Dockerfile (relative to the directory). Default: ‘Dockerfile’

  • 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: - the default ECR repository for CDK assets

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

stability :stability: experimental

Attributes

build_args

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 :default: - no build args are passed

stability :stability: experimental

Return type

Optional[Mapping[str, str]]

exclude

Glob patterns to exclude from the copy.

default :default: nothing is excluded

stability :stability: experimental

Return type

Optional[List[str]]

extra_hash

Extra information to encode into the fingerprint (e.g. build instructions and other inputs).

default :default: - hash is only based on source content

stability :stability: experimental

Return type

Optional[str]

file

Path to the Dockerfile (relative to the directory).

default :default: ‘Dockerfile’

stability :stability: experimental

Return type

Optional[str]

follow

A strategy for how to handle symlinks.

default :default: Never

stability :stability: experimental

Return type

Optional[FollowMode]

repository_name

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 :default: - the default ECR repository for CDK assets

deprecated :deprecated:

to control the location of docker image assets, please override Stack.addDockerImageAsset. this feature will be removed in future releases.

stability :stability: deprecated

Return type

Optional[str]

target

Docker target to build to.

default :default: - no target

stability :stability: experimental

Return type

Optional[str]