AssetImageCodeProps¶
-
class
aws_cdk.aws_lambda.
AssetImageCodeProps
(*, exclude=None, follow=None, ignore_mode=None, extra_hash=None, follow_symlinks=None, build_args=None, file=None, repository_name=None, target=None, cmd=None, entrypoint=None)¶ Bases:
aws_cdk.aws_ecr_assets.DockerImageAssetOptions
Properties to initialize a new AssetImage.
- Parameters
exclude (
Optional
[Sequence
[str
]]) – Glob patterns to exclude from the copy. Default: - nothing is excludedfollow (
Optional
[FollowMode
]) – (deprecated) A strategy for how to handle symlinks. Default: Neverignore_mode (
Optional
[IgnoreMode
]) – The ignore behavior to use for exclude patterns. Default: IgnoreMode.GLOBextra_hash (
Optional
[str
]) – Extra information to encode into the fingerprint (e.g. build instructions and other inputs). Default: - hash is only based on source contentfollow_symlinks (
Optional
[SymlinkFollowMode
]) – A strategy for how to handle symlinks. Default: SymlinkFollowMode.NEVERbuild_args (
Optional
[Mapping
[str
,str
]]) – (experimental) Build args to pass to thedocker build
command. Since Docker build arguments are resolved before deployment, keys and values cannot refer to unresolved tokens (such aslambda.functionArn
orqueue.queueUrl
). Default: - no build args are passedfile (
Optional
[str
]) – (experimental) Path to the Dockerfile (relative to the directory). Default: ‘Dockerfile’repository_name (
Optional
[str
]) – (deprecated) 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 assetstarget (
Optional
[str
]) – (experimental) Docker target to build to. Default: - no targetcmd (
Optional
[Sequence
[str
]]) – Specify or override the CMD on the specified Docker image or Dockerfile. This needs to be in the ‘exec form’, viz.,[ 'executable', 'param1', 'param2' ]
. Default: - use the CMD specified in the docker image or Dockerfile.entrypoint (
Optional
[Sequence
[str
]]) – Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile. An ENTRYPOINT allows you to configure a container that will run as an executable. This needs to be in the ‘exec form’, viz.,[ 'executable', 'param1', 'param2' ]
. Default: - use the ENTRYPOINT in the docker image or Dockerfile.
Attributes
-
build_args
¶ (experimental) 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
orqueue.queueUrl
).- Default
no build args are passed
- Stability
experimental
- Return type
Optional
[Mapping
[str
,str
]]
-
cmd
¶ Specify or override the CMD on the specified Docker image or Dockerfile.
This needs to be in the ‘exec form’, viz.,
[ 'executable', 'param1', 'param2' ]
.- Default
use the CMD specified in the docker image or Dockerfile.
- See
- Return type
Optional
[List
[str
]]
-
entrypoint
¶ Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.
An ENTRYPOINT allows you to configure a container that will run as an executable. This needs to be in the ‘exec form’, viz.,
[ 'executable', 'param1', 'param2' ]
.- Default
use the ENTRYPOINT in the docker image or Dockerfile.
- See
https://docs.docker.com/engine/reference/builder/#entrypoint
- Return type
Optional
[List
[str
]]
-
exclude
¶ Glob patterns to exclude from the copy.
- Default
nothing is excluded
- Return type
Optional
[List
[str
]]
-
extra_hash
¶ Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
- Default
hash is only based on source content
- Return type
Optional
[str
]
-
file
¶ (experimental) Path to the Dockerfile (relative to the directory).
- Default
‘Dockerfile’
- Stability
experimental
- Return type
Optional
[str
]
-
follow
¶ (deprecated) A strategy for how to handle symlinks.
- Default
Never
- Deprecated
use
followSymlinks
instead- Stability
deprecated
- Return type
Optional
[FollowMode
]
-
follow_symlinks
¶ A strategy for how to handle symlinks.
- Default
SymlinkFollowMode.NEVER
- Return type
Optional
[SymlinkFollowMode
]
-
ignore_mode
¶ The ignore behavior to use for exclude patterns.
- Default
IgnoreMode.GLOB
- Return type
Optional
[IgnoreMode
]
-
repository_name
¶ (deprecated) 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
- Deprecated
to control the location of docker image assets, please override
Stack.addDockerImageAsset
. this feature will be removed in future releases.- Stability
deprecated
- Return type
Optional
[str
]
-
target
¶ (experimental) Docker target to build to.
- Default
no target
- Stability
experimental
- Return type
Optional
[str
]