ContainerImageAssetMetadataEntry¶
-
class
aws_cdk.cloud_assembly_schema.
ContainerImageAssetMetadataEntry
(*, id, packaging, path, source_hash, build_args=None, file=None, image_name_parameter=None, image_tag=None, network_mode=None, platform=None, repository_name=None, target=None)¶ Bases:
object
Metadata Entry spec for container images.
- Parameters
id (
str
) – Logical identifier for the asset.packaging (
str
) – Type of asset.path (
str
) – Path on disk to the asset.source_hash (
str
) – The hash of the asset source.build_args (
Optional
[Mapping
[str
,str
]]) – Build args to pass to thedocker build
command. Default: no build args are passedfile (
Optional
[str
]) – Path to the Dockerfile (relative to the directory). Default: - no file is passedimage_name_parameter (
Optional
[str
]) – (deprecated) ECR Repository name and repo digest (separated by “@sha256:”) where this image is stored. Default: undefined If not specified,repositoryName
andimageTag
are required because otherwise how will the stack know where to find the asset, ha?image_tag (
Optional
[str
]) – The docker image tag to use for tagging pushed images. This field is required ifimageParameterName
is ommited (otherwise, the app won’t be able to find the image). Default: - this parameter is REQUIRED after 1.21.0network_mode (
Optional
[str
]) – Networking mode for the RUN commands during build. Default: - no networking mode specifiedplatform (
Optional
[str
]) – Platform to build for. Requires Docker Buildx. Default: - current machine platformrepository_name (
Optional
[str
]) – ECR repository name, if omitted a default name based on the asset’s ID is used instead. 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: - this parameter is REQUIRED after 1.21.0target (
Optional
[str
]) – Docker target to build to. Default: no build target
- ExampleMetadata
fixture=_generated
Example:
# Example automatically generated from non-compiling source. May contain errors. # The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.cloud_assembly_schema as cloud_assembly_schema container_image_asset_metadata_entry = cloud_assembly_schema.ContainerImageAssetMetadataEntry( id="id", packaging="packaging", path="path", source_hash="sourceHash", # the properties below are optional build_args={ "build_args_key": "buildArgs" }, file="file", image_name_parameter="imageNameParameter", image_tag="imageTag", network_mode="networkMode", platform="platform", repository_name="repositoryName", target="target" )
Attributes
-
build_args
¶ Build args to pass to the
docker build
command.- Default
no build args are passed
- Return type
Optional
[Mapping
[str
,str
]]
-
file
¶ Path to the Dockerfile (relative to the directory).
- Default
no file is passed
- Return type
Optional
[str
]
-
id
¶ Logical identifier for the asset.
- Return type
str
-
image_name_parameter
¶ “) where this image is stored.
- Default
undefined If not specified,
repositoryName
andimageTag
are required because otherwise how will the stack know where to find the asset, ha?- Deprecated
specify
repositoryName
andimageTag
instead, and then you know where the image will go.- Stability
deprecated
- Type
(deprecated) ECR Repository name and repo digest (separated by “@sha256
- Return type
Optional
[str
]
-
image_tag
¶ The docker image tag to use for tagging pushed images.
This field is required if
imageParameterName
is ommited (otherwise, the app won’t be able to find the image).- Default
this parameter is REQUIRED after 1.21.0
- Return type
Optional
[str
]
-
network_mode
¶ Networking mode for the RUN commands during build.
- Default
no networking mode specified
- Return type
Optional
[str
]
-
packaging
¶ Type of asset.
- Return type
str
-
path
¶ Path on disk to the asset.
- Return type
str
-
platform
¶ Platform to build for.
Requires Docker Buildx.
- Default
current machine platform
- Return type
Optional
[str
]
-
repository_name
¶ ECR repository name, if omitted a default name based on the asset’s ID is used instead.
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
this parameter is REQUIRED after 1.21.0
- Return type
Optional
[str
]
-
source_hash
¶ The hash of the asset source.
- Return type
str
-
target
¶ Docker target to build to.
- Default
no build target
- Return type
Optional
[str
]