I'm using CDK for a while and I'm not sure yet which is the best way to launch a stack that create an ECR repository, building and sending a docker image to ECR.
My last try was something like that:
taskDefinition.addContainer("container", {
image: new AssetImage('./', {
repositoryName: "name"
})
});
But there is an issue on this approach, the repositoryName is deprecated at AssetImage class and it looks deprecated everywhere.
Can someone tells how can we launch this kind of stuff?