Skip to main content

CDK Docker Image Deployment

This module allows you to copy docker image assets to a repository you control. This can be necessary if you want to build a Docker image in one CDK app and consume it in a different app or outside the CDK, or if you want to apply a lifecycle policy to all images of a part of your application.

Getting Started

Below is a basic example for how to use the DockerImageDeployment API:

import * as ecr from 'aws-cdk-lib/aws-ecr';
import * as imagedeploy from 'cdk-docker-image-deployment';

const repo = ecr.Repository.fromRepositoryName(this, 'MyRepository', 'myrepository');

new imagedeploy.DockerImageDeployment(this, 'ExampleImageDeploymentWithTag', {
  source: imagedeploy.Source.directory('path/to/directory'),
  destination: imagedeploy.Destination.ecr(repo, {
    tag: 'myspecialtag',
  }),
});

Currently Supported Sources

  • Source.directory(): Supply a path to a local docker image as source.

Don't see a source listed? See if there is an open issue or PR already. If not, please open an issue asking for it or better yet, submit a contribution!

Currently Supported Destinations

  • Destination.ecr(repo, options): Send your docker image to an ECR repository in your stack's account.

Don't see a destination listed? See if there is an open issue or PR already. If not, please open an issue asking for it or better yet, submit a contribution!

Under the Hood

  1. When this stack is deployed (either via cdk deploy or via CI/CD), the contents of the local Docker image will be archived and uploaded to an intermediary assets ECR Repository using the cdk-assets mechanism.
  2. The DockerImageDeployment construct synthesizes a CodeBuild Project which uses docker to pull the image from the intermediary repository, tag the image if a tag is provided, and push the image to the destination repository.
  3. The deployment will wait until the CodeBuild Project completes successfully before finishing.

The architecture of this construct can be seen here:

Construct-Architecture

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Metadata

Release files for cdk-docker-image-deployment 0.0.1041

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdk-docker-image-deployment 0.0.1041
File Size Uploaded Provenance Actions
cdk_docker_image_deployment-0.0.1041.tar.gz 13.1 MB With provenance Details for cdk_docker_image_deployment-0.0.1041.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cdk-docker-image-deployment 0.0.1041
File Interpreter ABI Platform Actions
cdk_docker_image_deployment-0.0.1041-py3-none-any.whl Python 3 none any Details for cdk_docker_image_deployment-0.0.1041-py3-none-any.whl

Total release size: 26.2 MB

Release files / cdk_docker_image_deployment-0.0.1041.tar.gz

Download URL cdk_docker_image_deployment-0.0.1041.tar.gz
Size 13.1 MB
Tags Source
SHA-256 checksum
How to use checksums
7c684b78ff95ae733cdefd0c97b1b88473d4b7e745836d4fb6551a3a9b5773ac
BLAKE2b-256 checksum
How to use checksums
00088492c8fc2b3aaeec0c7f5358f7b349f0e2f64660303e702aacb6f4972bcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.15.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / cdk_docker_image_deployment-0.0.1041-py3-none-any.whl

Download URL cdk_docker_image_deployment-0.0.1041-py3-none-any.whl
Size 13.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f5c52de0b0eef70f411d8d55faa7f4b44402745b6f296f6498d99c0791781d4f
BLAKE2b-256 checksum
How to use checksums
900ac18c1f70f947473b9b6db7e55cfb1f213037bf8bcc6da62d0229fcd8fa79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.15.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for cdk-docker-image-deployment 0.0.1041

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cdk_docker_image_deployment-0.0.1041.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1041 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page