Class ContainerImageAssetMetadataEntry
Metadata Entry spec for container images.
Inheritance
Implements
Namespace: Amazon.CDK.CloudAssembly.Schema
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ContainerImageAssetMetadataEntry : Object, IContainerImageAssetMetadataEntry
Syntax (vb)
Public Class ContainerImageAssetMetadataEntry
Inherits Object
Implements IContainerImageAssetMetadataEntry
Examples
IDictionary<string, string> entry = new Dictionary<string, string> {
{ "packaging", "container-image" },
{ "repositoryName", "repository-name" },
{ "imageTag", "tag" }
};
Synopsis
Constructors
ContainerImageAssetMetadataEntry() |
Properties
BuildArgs | Build args to pass to the |
BuildSecrets | Build secrets to pass to the |
BuildSsh | SSH agent socket or keys to pass to the |
CacheDisabled | Disable the cache and pass |
CacheFrom | Cache from options to pass to the |
CacheTo | Cache to options to pass to the |
File | Path to the Dockerfile (relative to the directory). |
Id | Logical identifier for the asset. |
ImageTag | The docker image tag to use for tagging pushed images. |
NetworkMode | Networking mode for the RUN commands during build. |
Outputs | Outputs to pass to the |
Packaging | Type of asset. |
Path | Path on disk to the asset. |
Platform | Platform to build for. |
RepositoryName | ECR repository name, if omitted a default name based on the asset's ID is used instead. |
SourceHash | The hash of the asset source. |
Target | Docker target to build to. |
Constructors
ContainerImageAssetMetadataEntry()
public ContainerImageAssetMetadataEntry()
Properties
BuildArgs
Build args to pass to the docker build
command.
public IDictionary<string, string> BuildArgs { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: no build args are passed
BuildSecrets
Build secrets to pass to the docker build
command.
public IDictionary<string, string> BuildSecrets { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: no build secrets are passed
BuildSsh
SSH agent socket or keys to pass to the docker build
command.
public string BuildSsh { get; set; }
Property Value
System.String
Remarks
Default: no ssh arg is passed
CacheDisabled
Disable the cache and pass --no-cache
to the docker build
command.
public Nullable<bool> CacheDisabled { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - cache is used
CacheFrom
Cache from options to pass to the docker build
command.
public IContainerImageAssetCacheOption[] CacheFrom { get; set; }
Property Value
IContainerImageAssetCacheOption[]
Remarks
Default: - no cache from options are passed to the build command
CacheTo
Cache to options to pass to the docker build
command.
public IContainerImageAssetCacheOption CacheTo { get; set; }
Property Value
IContainerImageAssetCacheOption
Remarks
Default: - no cache to options are passed to the build command
File
Path to the Dockerfile (relative to the directory).
public string File { get; set; }
Property Value
System.String
Remarks
Default: - no file is passed
Id
Logical identifier for the asset.
public string Id { get; set; }
Property Value
System.String
ImageTag
The docker image tag to use for tagging pushed images.
public string ImageTag { get; set; }
Property Value
System.String
Remarks
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
NetworkMode
Networking mode for the RUN commands during build.
public string NetworkMode { get; set; }
Property Value
System.String
Remarks
Default: - no networking mode specified
Outputs
Outputs to pass to the docker build
command.
public string[] Outputs { get; set; }
Property Value
System.String[]
Remarks
Default: - no outputs are passed to the build command (default outputs are used)
See: https://docs.docker.com/engine/reference/commandline/build/#custom-build-outputs
Packaging
Type of asset.
public string Packaging { get; set; }
Property Value
System.String
Path
Path on disk to the asset.
public string Path { get; set; }
Property Value
System.String
Platform
Platform to build for.
public string Platform { get; set; }
Property Value
System.String
Remarks
Requires Docker Buildx.
Default: - current machine platform
RepositoryName
ECR repository name, if omitted a default name based on the asset's ID is used instead.
public string RepositoryName { get; set; }
Property Value
System.String
Remarks
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
SourceHash
The hash of the asset source.
public string SourceHash { get; set; }
Property Value
System.String
Target
Docker target to build to.
public string Target { get; set; }
Property Value
System.String
Remarks
Default: no build target