You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Even though ECS and ECR are different services, they are often used in conjunction. Currently, the ECS composer documentation does not name any details on how to publish built images, but silently assumes they are already available somewhere.
There might need to be a mechanism in place to determine which services are targeted towards an ECR, and which are not. Maybe the x-aws-ecr attribute should become a direct service attribute.
The text was updated successfully, but these errors were encountered:
Just noted that docker compose up will create resources, so the first part of the proposal (creating the ECR resource) might not be feasible, as the ECR already needs to exist at build and push time, in order to name and send the image.
Maybe the second part of the proposal is independent of this. Even when the ECR is provisioned externally, we can help in naming/tagging the built image correctly. This requires that docker compose resolves the ECR name to the FQDN given the AWS context. The push operation can be improved by automating the required aws ecr get-login operation.
👎 to ensure compose model portability, if your service declares image: my-app:latest then image should not be replaced by an ECR one, so that you can run compose up on local development workstation with the same image.
If you prefer pushing to ECR vs DockerHub, use fully qualified image URL. Tip: to avoid hardcoding your account and region, you can use variables here: image: $AWS_ACCOUNT.dkr.ecr.$AWS_REGION.amazonaws.com/my-app:latest
We also don't want to get more non-portable custom x-aws-* extensions introduced in the compose model (extensions have been define to allow experimenting new features that would eventually become standard by compose spec, not to build a higher-level aws model on top of the compose one, see #1411)
This proposal is twofold:
Current solution:
aws ecr get-login
prior todocker-compose push
Proposed usage:
This creates an image named
<accountnumber>.dkr.ecr.<region>.amazonaws.com/my-app:latest
This will push the image to the above registry.
It requires further IAM permissions next to the documented ones: https://docs.docker.com/cloud/ecs-integration/#requirements
Even though ECS and ECR are different services, they are often used in conjunction. Currently, the ECS composer documentation does not name any details on how to publish built images, but silently assumes they are already available somewhere.
There might need to be a mechanism in place to determine which services are targeted towards an ECR, and which are not. Maybe the
x-aws-ecr
attribute should become a direct service attribute.The text was updated successfully, but these errors were encountered: