{"id":23401,"library":"cdk-docker-image-deployment","title":"cdk-docker-image-deployment","description":"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.","status":"active","version":"0.0.986","language":"python","source_language":"en","source_url":"https://github.com/cdklabs/cdk-docker-image-deployment","tags":["cdk","docker","ecr","image-deployment"],"install":[{"cmd":"pip install cdk-docker-image-deployment","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Peer dependency; required for CDK constructs.","package":"aws-cdk-lib","optional":false}],"imports":[{"note":"Hyphens not allowed in Python imports; use underscores.","wrong":"from cdk-docker-image-deployment import DockerImageDeployment","symbol":"DockerImageDeployment","correct":"from cdk_docker_image_deployment import DockerImageDeployment"},{"note":"","wrong":null,"symbol":"Source","correct":"from cdk_docker_image_deployment import Source"}],"quickstart":{"code":"from aws_cdk import App, Stack\nfrom cdk_docker_image_deployment import DockerImageDeployment, Source\n\napp = App()\nstack = Stack(app, \"MyStack\")\n\nDockerImageDeployment(stack, \"DeployImage\",\n    source=Source.docker_hub(\"public.ecr.aws/docker/library/nginx:latest\"),\n    destination=DockerImageName(\"<account-id>.dkr.ecr.<region>.amazonaws.com/my-nginx:latest\")\n)\n\napp.synth()","lang":"python","description":"Deploys a Docker image from DockerHub to ECR. Replace placeholders with actual account ID and region."},"warnings":[{"fix":"Ensure your CDK app uses aws-cdk-lib (v2) instead of @aws-cdk/core.","message":"CDK v1 support dropped. Use aws-cdk-lib v2.","severity":"breaking","affected_versions":">=0.0.500"},{"fix":"Make sure Docker is running in the environment where you run cdk synth.","message":"The library requires Docker to be running during deployment synthesis (not cdk deploy but during cdk synth or pipeline build).","severity":"gotcha","affected_versions":"all"},{"fix":"Always include a tag like 'nginx:latest' or 'nginx:1.21'.","message":"Source.docker_hub() pulls from Docker Hub by default, but you must specify a tag; 'latest' is not automatically applied.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.0.986':34 'account':26 'cdk':2,6,37 'cdk-docker-image-deploy':1 'construct':7 'copi':10 'cross':25,29 'cross-account':24 'cross-region':28 'current':32 'deploy':5,31,42 'docker':3,11,38 'dockerhub':16 'ecr':15,39 'etc':17 'frequent':36 'imag':4,12,41 'image-deploy':40 'librari':8 'option':19 'region':30 'releas':35 'repositori':14 'tag':20 'use':22 'version':33","created_at":"2026-05-01T08:07:35.374406+00:00","updated_at":"2026-05-01T08:07:35.374406+00:00","problems":[{"fix":"Install with 'pip install cdk-docker-image-deployment' and import as 'cdk_docker_image_deployment'.","cause":"Trying to import with hyphens instead of underscores.","error":"ModuleNotFoundError: No module named 'cdk-docker-image-deployment'"},{"fix":"Update your CDK app to aws-cdk-lib v2.","cause":"Incompatible CDK version (e.g., using v1 with v2 construct).","error":"jsii.errors.JSIIError: Your application requires a newer version of the AWS CDK library. This version is ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.0.986","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/cdklabs/cdk-docker-image-deployment#readme","docs":null,"changelog":null,"pypi":"https://pypi.org/project/cdk-docker-image-deployment/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["aws","devops","http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}