aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

ECR Assets: Shared Assets preventing seperate ECR repo creation for ECS services

Open EduardTheThird opened this issue 6 years ago • 2 comments

Previously when creating an ECS service and using the ECR asset functionality, an ECR repo was created for that service. Having the service have it's own ECR repo allows us to easier manage it as it was linked to a service. With the shared repository, tags such as latest, qa, dev now conflict.

Ideally when using ECS.ContainerImage.fromAsset to create the Docker image, we would like to specify what the ECR repo and tag it should create for it.

The central ECR repo could be retained, however, we would appreciate the option to retain the old or similar workflow.

Reproduction Steps

Call ContainerImage.fromAsset to build local Docker image for the service, a central ECR repo is created, aws-cdk/assets, not cdk/servicename.

Ideally, we would like to be able to specify what ECR repo and image tag it should create.

Error Log

Environment

  • **CLI Version :1.22
  • **Framework Version:1.22
  • **OS :Windows 10
  • **Language :TypeScript

Other


This is :bug: Bug Report

EduardTheThird avatar Jan 27 '20 12:01 EduardTheThird

Hi @EduardTheThird, we would love to learn more about your workflow as it was not something we considered when designing docker assets in the CDK. Generally speaking, assets are not designed to be used as externally published artifacts, only consumed by CDK applications.

Can you please describe who is consuming these docker images and how they are tagged with latest, qa, beta, etc?

eladb avatar Jan 27 '20 13:01 eladb

Let's continue this discussion in #5971 please

eladb avatar Jan 27 '20 13:01 eladb