(experimental) Called when the image is used by a SageMaker task.
from_asset(scope, id, *, directory, build_args=None, file=None, repository_name=None, target=None, extra_hash=None, exclude=None, follow=None, ignore_mode=None)¶
(experimental) Reference a Docker image that is provided as an Asset in the current app.
Construct) – the scope in which to create the Asset.
str) – the ID for the asset in the construct tree.
str) – (experimental) The directory where the Dockerfile is stored.
str]]) – (experimental) Build args to pass to the
docker buildcommand. Since Docker build arguments are resolved before deployment, keys and values cannot refer to unresolved tokens (such as
queue.queueUrl). Default: - no build args are passed
str]) – (experimental) Path to the Dockerfile (relative to the directory). Default: ‘Dockerfile’
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 assets
str]) – (experimental) Docker target to build to. Default: - no target
str]) – (deprecated) Extra information to encode into the fingerprint (e.g. build instructions and other inputs). Default: - hash is only based on source content
str]]) – (deprecated) Glob patterns to exclude from the copy. Default: nothing is excluded
FollowMode]) – (deprecated) A strategy for how to handle symlinks. Default: Never
IgnoreMode]) – (deprecated) The ignore behavior to use for exclude patterns. Default: - GLOB for file assets, DOCKER or GLOB for docker assets depending on whether the ‘
- Return type
(experimental) Reference a Docker image stored in an ECR repository.
(experimental) Reference a Docker image which URI is obtained from the task’s input.
str) – the JSON path expression with the task input.
bool]) – whether ECR access should be permitted (set to
falseif the image will never be in ECR).
- Return type