Registry / aws / cdk-docker-image-deployment

cdk-docker-image-deployment

JSON →
library0.0.986pypypi✓ verified 88d ago

CDK construct library to copy Docker images between repositories (ECR, DockerHub etc.) and optionally tag them. Useful for cross-account or cross-region deployments. Current version: 0.0.986. Released frequently.

pip install cdk-docker-image-deployment
INSTALL
IMPORT
SIG · CDK-DOCKER-IMAGE-D
C
cdk-docker-image-deployment
awspythonv0.0.986
Install
18.3s avg
Import
—
Disk
412MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.0.986 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 374MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 18.3s · import 0.000s · 374MB
412MB installed
● package 412MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DockerImageDeployment
✓ from cdk_docker_image_deployment import DockerImageDeployment
✗ from cdk-docker-image-deployment import DockerImageDeployment
Hyphens not allowed in Python imports; use underscores.
Source
✓ from cdk_docker_image_deployment import Source

Deploys a Docker image from DockerHub to ECR. Replace placeholders with actual account ID and region.

from aws_cdk import App, Stack from cdk_docker_image_deployment import DockerImageDeployment, Source app = App() stack = Stack(app, "MyStack") DockerImageDeployment(stack, "DeployImage", source=Source.docker_hub("public.ecr.aws/docker/library/nginx:latest"), destination=DockerImageName("<account-id>.dkr.ecr.<region>.amazonaws.com/my-nginx:latest") ) app.synth()
Debug
Known issues
breakingCDK v1 support dropped. Use aws-cdk-lib v2.
fix
Ensure your CDK app uses aws-cdk-lib (v2) instead of @aws-cdk/core.
affects: >=0.0.500
gotchaThe library requires Docker to be running during deployment synthesis (not cdk deploy but during cdk synth or pipeline build).
fix
Make sure Docker is running in the environment where you run cdk synth.
affects: all
gotchaSource.docker_hub() pulls from Docker Hub by default, but you must specify a tag; 'latest' is not automatically applied.
fix
Always include a tag like 'nginx:latest' or 'nginx:1.21'.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'cdk-docker-image-deployment'
Trying to import with hyphens instead of underscores.
fix
Install with 'pip install cdk-docker-image-deployment' and import as 'cdk_docker_image_deployment'.
jsii.errors.JSIIError: Your application requires a newer version of the AWS CDK library. This version is ...
Incompatible CDK version (e.g., using v1 with v2 construct).
fix
Update your CDK app to aws-cdk-lib v2.
Upgrade
Version history
0.0.986latest on PyPI · released Mar 27, 2026
Audit
Dependencies
aws-cdk-librequiredPeer dependency; required for CDK constructs.
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
cdk-docker-image-deployment — pip install cdk-docker-image-deployment · libregistry