cdk-docker-image-deployment


Namecdk-docker-image-deployment JSON
Version 0.0.891 PyPI version JSON
download
home_pagehttps://github.com/cdklabs/cdk-docker-image-deployment#readme
SummaryThis 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.
upload_time2025-09-02 00:30:50
maintainerNone
docs_urlNone
authorParker Scanlon
requires_python~=3.9
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## 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:

```python
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](https://github.com/cdklabs/cdk-docker-image-deployment/issues)
> or [PR](https://github.com/cdklabs/cdk-docker-image-deployment/pulls) 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](https://github.com/cdklabs/cdk-docker-image-deployment/issues)
> or [PR](https://github.com/cdklabs/cdk-docker-image-deployment/pulls) 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](https://user-images.githubusercontent.com/36202692/187282269-7ab29d3e-192f-470f-9123-5dbb62d9dac3.jpg)

## Security

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

## License

This project is licensed under the Apache-2.0 License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cdklabs/cdk-docker-image-deployment#readme",
    "name": "cdk-docker-image-deployment",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Parker Scanlon",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a9/61/8ca34ef0d72072f15b8c98e98a92cd229c899cf7064ed10b51c8c26727bb/cdk_docker_image_deployment-0.0.891.tar.gz",
    "platform": null,
    "description": "## CDK Docker Image Deployment\n\nThis module allows you to copy docker image assets to a repository you control.\nThis 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,\nor if you want to apply a lifecycle policy to all images of a part of your application.\n\n### Getting Started\n\nBelow is a basic example for how to use the `DockerImageDeployment` API:\n\n```python\nimport * as ecr from 'aws-cdk-lib/aws-ecr';\nimport * as imagedeploy from 'cdk-docker-image-deployment';\n\nconst repo = ecr.Repository.fromRepositoryName(this, 'MyRepository', 'myrepository');\n\nnew imagedeploy.DockerImageDeployment(this, 'ExampleImageDeploymentWithTag', {\n  source: imagedeploy.Source.directory('path/to/directory'),\n  destination: imagedeploy.Destination.ecr(repo, {\n    tag: 'myspecialtag',\n  }),\n});\n```\n\n### Currently Supported Sources\n\n* `Source.directory()`: Supply a path to a local docker image as source.\n\n> Don't see a source listed? See if there is an open [issue](https://github.com/cdklabs/cdk-docker-image-deployment/issues)\n> or [PR](https://github.com/cdklabs/cdk-docker-image-deployment/pulls) already. If not, please open an issue asking for it\n> or better yet, submit a contribution!\n\n### Currently Supported Destinations\n\n* `Destination.ecr(repo, options)`: Send your docker image to an ECR repository in your stack's account.\n\n> Don't see a destination listed? See if there is an open [issue](https://github.com/cdklabs/cdk-docker-image-deployment/issues)\n> or [PR](https://github.com/cdklabs/cdk-docker-image-deployment/pulls) already. If not, please open an issue asking for it\n> or better yet, submit a contribution!\n\n### Under the Hood\n\n1. 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.\n2. 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.\n3. The deployment will wait until the CodeBuild Project completes successfully before finishing.\n\nThe architecture of this construct can be seen here:\n\n![Construct-Architecture](https://user-images.githubusercontent.com/36202692/187282269-7ab29d3e-192f-470f-9123-5dbb62d9dac3.jpg)\n\n## Security\n\nSee [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "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.",
    "version": "0.0.891",
    "project_urls": {
        "Homepage": "https://github.com/cdklabs/cdk-docker-image-deployment#readme",
        "Source": "https://github.com/cdklabs/cdk-docker-image-deployment.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d46d8cdf0387142976fd512d88aed665d92adff0d8e4ffe8f1c7ee6bc421e494",
                "md5": "3fb6f6944de9a2f411cf48238012d42b",
                "sha256": "a9978c723c0867aff0cbc4f9a444ba23215c9ca28cb11393f09f259a7a1416ad"
            },
            "downloads": -1,
            "filename": "cdk_docker_image_deployment-0.0.891-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3fb6f6944de9a2f411cf48238012d42b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.9",
            "size": 13096054,
            "upload_time": "2025-09-02T00:30:46",
            "upload_time_iso_8601": "2025-09-02T00:30:46.992095Z",
            "url": "https://files.pythonhosted.org/packages/d4/6d/8cdf0387142976fd512d88aed665d92adff0d8e4ffe8f1c7ee6bc421e494/cdk_docker_image_deployment-0.0.891-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a9618ca34ef0d72072f15b8c98e98a92cd229c899cf7064ed10b51c8c26727bb",
                "md5": "dc51b974c3ed646f8f1d58c27c6c77df",
                "sha256": "7425aaf61f07f5723d428f2bad7cbd24ad5487479d795055fdf53e810c845c40"
            },
            "downloads": -1,
            "filename": "cdk_docker_image_deployment-0.0.891.tar.gz",
            "has_sig": false,
            "md5_digest": "dc51b974c3ed646f8f1d58c27c6c77df",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.9",
            "size": 13096667,
            "upload_time": "2025-09-02T00:30:50",
            "upload_time_iso_8601": "2025-09-02T00:30:50.054126Z",
            "url": "https://files.pythonhosted.org/packages/a9/61/8ca34ef0d72072f15b8c98e98a92cd229c899cf7064ed10b51c8c26727bb/cdk_docker_image_deployment-0.0.891.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-02 00:30:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cdklabs",
    "github_project": "cdk-docker-image-deployment#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cdk-docker-image-deployment"
}
        
Elapsed time: 1.06059s