# ContainerImageAssetMetadataEntry

Metadata Entry spec for container images.

- Source: [`node_modules/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/metadata-schema.d.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/node_modules/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/metadata-schema.d.ts#L111)
- Type last changed: v2.245.0 · 27 Mar 2026

## Example

```ts
const entry = {
  packaging: 'container-image',
  repositoryName: 'repository-name',
  imageTag: 'tag',
}
```

## Properties

- `buildArgs`: { [key: string]: string } — Build args to pass to the `docker build` command.

  **Default:** no build args are passed

- `buildContexts`: { [key: string]: string } — Build contexts to pass to the `docker build` command.

  **Default:** no build contexts are passed

- `buildSecrets`: { [key: string]: string } — Build secrets to pass to the `docker build` command.

  **Default:** no build secrets are passed

- `buildSsh`: string — SSH agent socket or keys to pass to the `docker build` command.

  **Default:** no ssh arg is passed

- `cacheDisabled`: boolean — Disable the cache and pass `--no-cache` to the `docker build` command.

  **Default:** cache is used

- `cacheFrom`: [ContainerImageAssetCacheOption](/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ContainerImageAssetCacheOption.html)[] — Cache from options to pass to the `docker build` command.

  **Default:** no cache from options are passed to the build command

- `cacheTo`: [ContainerImageAssetCacheOption](/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ContainerImageAssetCacheOption.html) — Cache to options to pass to the `docker build` command.

  **Default:** no cache to options are passed to the build command

- `file`: string — Path to the Dockerfile (relative to the directory).

  **Default:** no file is passed

- `id`: string (required) — Logical identifier for the asset.

- `imageTag`: string — The docker image tag to use for tagging pushed images.

  **Default:** this parameter is REQUIRED after 1.21.0

  This field is
  required if `imageParameterName` is ommited (otherwise, the app won't be
  able to find the image).

- `networkMode`: string — Networking mode for the RUN commands during build.

  **Default:** no networking mode specified

- `outputs`: string[] — Outputs to pass to the `docker build` command.

  **Default:** no outputs are passed to the build command (default outputs are used)

- `packaging`: string (required) — Type of asset.

- `path`: string (required) — Path on disk to the asset.

- `platform`: string — Platform to build for.

  **Default:** current machine platform

  _Requires Docker Buildx_.

- `repositoryName`: string — ECR repository name, if omitted a default name based on the asset's ID is used instead.

  **Default:** this parameter is REQUIRED after 1.21.0

  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.

- `sourceHash`: string (required) — The hash of the asset source.

- `target`: string — Docker target to build to.

  **Default:** no build target
