-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DockerImageAsset: it fails to deploy to 2 regions #25962
Comments
Have you tried const region = props.env!.region
const image = new ecrassets.DockerImageAsset(this, `MultiRegionImage-${region}`, {
directory: path.join(__dirname, "../docker.d"),
extraHash: region,
}); |
@pahud if this is required to deploy to multiple regions, we should add this to the readme. |
Hi @pahud, @peterwoodworth, |
|
The root cause for this issue is that a tag for imageUri is only added on build phase, which runs only once per asset hash, where it is actually required for each region.
We may want to move this tagging process to the publish phase. We have to somehow pass the |
Describe the bug
I have a CDK stack with DockerImageAsset that I use to deploy to 2 different regions.
The instance of the second stack is not pushed to ECR
Expected Behavior
The image is present in the ECR of both regions
Current Behavior
Only the first stack is correctly pushing the image to ECR
Reproduction Steps
sample-cdk-stack.ts
sample-cdk.ts
The DcokerImage can be a simple express application
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.83.1
Framework Version
No response
Node.js Version
v16.15.1
OS
macOS Monterey 12.4
Language
Typescript
Language Version
~5.0.4
Other information
No response
The text was updated successfully, but these errors were encountered: