(ecr-deployment): new aws-ecr-deployment module
See original GitHub issue๐๐๐ The CDK team is picking up this feature request! Check below for more details!
We understand this is a highly desirable feature. Until we are able to integrate it into the CDK, we recommend considering the cdk-ecr-deployment library.
Let us know what you think! โค๏ธ
Allow users to publish docker image assets to arbitrary ECR repositories. Similar to how s3-deployment works for S3:
const image = new DockerImageAsset(...);
const myRepo = new ecr.Repository(...);
new RepositoryDeployment(this, 'MyDeployment', {
from: image,
to: myRepo
});
Iโve been trying to identify if this is already supported. I am adding as a feature request. Let me know otherwise.
For this code snippet, is there a way to specify an image and tag that I want my local docker image to deploy to? I am posting the code in javascript since the example in the API reference is in JS, but my team uses python.
import { DockerImageAsset } from '@aws-cdk/aws-ecr-assets';
const asset = new DockerImageAsset(this, 'MyBuildImage', {
directory: path.join(__dirname, 'my-image')
});
Use Case
I would like to use this feature to completely deploy my local image source code to ECR for me using an ECR repo that I have previously created in my CDK app or more importantly outside the app using an arn. The biggest problem is that the image cannot be completely abstracted into the assets repo because of auditing and semantic versioning.
Proposed Solution
Here is my proposed solution.
import { DockerImageAsset } from '@aws-cdk/aws-ecr-assets';
const asset = new DockerImageAsset(this, 'MyBuildImage', {
directory: path.join(__dirname, 'my-image')
repo_name: 'company/my-image',
tag: '1.2.0'
});
Other
- ๐ I may be able to implement this feature request
- โ ๏ธ This feature might incur a breaking change
This is a ๐ Feature Request
Issue Analytics
- State:
- Created 3 years ago
- Reactions:594
- Comments:31 (18 by maintainers)
Top GitHub Comments
People on this thread, make sure to +1 so that we are able to prioritize this.
Great news! The CDK team will be picking this up and designing a package in the
aws-cdk
repository calledaws-ecr-deployment
. It will have similar functionality tocdklabs/cdk-ecr-deployment
, but will be maintained by the CDK team. We will keep you updated as this develops!