question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

(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:open
  • Created 3 years ago
  • Reactions:594
  • Comments:31 (18 by maintainers)

github_iconTop GitHub Comments

74reactions
eladbcommented, Mar 18, 2021

People on this thread, make sure to +1 so that we are able to prioritize this.

48reactions
scanlonpcommented, Jun 28, 2022

Great news! The CDK team will be picking this up and designing a package in the aws-cdk repository called aws-ecr-deployment. It will have similar functionality to cdklabs/cdk-ecr-deployment, but will be maintained by the CDK team. We will keep you updated as this develops!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial: Create a pipeline with an Amazon ECR source and ...
Describes how to use the console to create a pipeline with an Amazon ECR source and ECS-to-CodeDeploy deployment.
Read more >
Deploy the ECS Deploy Runner - Gruntwork Docs
You will need this later when setting up the terraform module. Create ECR repoโ€‹. The ECS Deploy Runner uses an ECS Task to...
Read more >
CI/CD using Github Actions, AWS ECR and ECS Fargate
An ECS Cluster to deploy our service; An ECS Service to run our ECS Tasks; An Elastic Container Registry (ECR) to store our...
Read more >
HENNGE/ecs/aws | service Submodule - Terraform Registry
Name Description Type Default Requir... cluster The cluster name or ARN. string n/a yes create_task_definition Create the task definition bool true no load_balancers List of map...
Read more >
How to Deploy a Dockerised Application on AWS ECS With ...
Guide Overview. We will follow these steps: Create a simple Node app and run it locally. Dockerize the Node app. Create an image...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found