{"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,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","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,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}