aws-cdk-lib.cloud_assembly_schema.ContainerImageAssetMetadataEntry

interface ContainerImageAssetMetadataEntry

LanguageType name
.NETAmazon.CDK.CloudAssembly.Schema.ContainerImageAssetMetadataEntry
Gogithub.com/aws/aws-cdk-go/awscdk/v2/cloudassemblyschema#ContainerImageAssetMetadataEntry
Javasoftware.amazon.awscdk.cloudassembly.schema.ContainerImageAssetMetadataEntry
Pythonaws_cdk.cloud_assembly_schema.ContainerImageAssetMetadataEntry
TypeScript (source)aws-cdk-lib » cloud_assembly_schema » ContainerImageAssetMetadataEntry

Metadata Entry spec for container images.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
const containerImageAssetMetadataEntry: cloud_assembly_schema.ContainerImageAssetMetadataEntry = {
  id: 'id',
  packaging: 'packaging',
  path: 'path',
  sourceHash: 'sourceHash',

  // the properties below are optional
  buildArgs: {
    buildArgsKey: 'buildArgs',
  },
  buildSecrets: {
    buildSecretsKey: 'buildSecrets',
  },
  cacheFrom: [{
    type: 'type',

    // the properties below are optional
    params: {
      paramsKey: 'params',
    },
  }],
  cacheTo: {
    type: 'type',

    // the properties below are optional
    params: {
      paramsKey: 'params',
    },
  },
  file: 'file',
  imageTag: 'imageTag',
  networkMode: 'networkMode',
  outputs: ['outputs'],
  platform: 'platform',
  repositoryName: 'repositoryName',
  target: 'target',
};

Properties

NameTypeDescription
idstringLogical identifier for the asset.
packagingstringType of asset.
pathstringPath on disk to the asset.
sourceHashstringThe hash of the asset source.
buildArgs?{ [string]: string }Build args to pass to the docker build command.
buildSecrets?{ [string]: string }Build secrets to pass to the docker build command.
cacheFrom?ContainerImageAssetCacheOption[]Cache from options to pass to the docker build command.
cacheTo?ContainerImageAssetCacheOptionCache to options to pass to the docker build command.
file?stringPath to the Dockerfile (relative to the directory).
imageTag?stringThe docker image tag to use for tagging pushed images.
networkMode?stringNetworking mode for the RUN commands during build.
outputs?string[]Outputs to pass to the docker build command.
platform?stringPlatform to build for.
repositoryName?stringECR repository name, if omitted a default name based on the asset's ID is used instead.
target?stringDocker target to build to.

id

Type: string

Logical identifier for the asset.


packaging

Type: string

Type of asset.


path

Type: string

Path on disk to the asset.


sourceHash

Type: string

The hash of the asset source.


buildArgs?

Type: { [string]: string } (optional, default: no build args are passed)

Build args to pass to the docker build command.


buildSecrets?

Type: { [string]: string } (optional, default: no build secrets are passed)

Build secrets to pass to the docker build command.


cacheFrom?

Type: ContainerImageAssetCacheOption[] (optional, default: no cache from options are passed to the build command)

Cache from options to pass to the docker build command.

See also: https://docs.docker.com/build/cache/backends/


cacheTo?

Type: ContainerImageAssetCacheOption (optional, default: no cache to options are passed to the build command)

Cache to options to pass to the docker build command.

See also: https://docs.docker.com/build/cache/backends/


file?

Type: string (optional, default: no file is passed)

Path to the Dockerfile (relative to the directory).


imageTag?

Type: string (optional, default: this parameter is REQUIRED after 1.21.0)

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).


networkMode?

Type: string (optional, default: no networking mode specified)

Networking mode for the RUN commands during build.


outputs?

Type: string[] (optional, default: no outputs are passed to the build command (default outputs are used))

Outputs to pass to the docker build command.

See also: https://docs.docker.com/engine/reference/commandline/build/#custom-build-outputs


platform?

Type: string (optional, default: current machine platform)

Platform to build for.

Requires Docker Buildx.


repositoryName?

Type: string (optional, default: this parameter is REQUIRED after 1.21.0)

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.


target?

Type: string (optional, default: no build target)

Docker target to build to.