1 Answer
- Newest
- Most votes
- Most comments
0
Hello
By reviewing the GitHub issue and the code snippet provided, it appears there may be issues in the steps followed for the accepted solutions.
So, can you try the following approach described in the issue:
Excluding cdk.out in asset object instead of cdk
`: image = ecr_assets.DockerImageAsset(self, 'DeployDockerImage',
..
exclude=['cdk.out'] // you are excluding cdk
)`
Alternative, the most popular solution suggests:
- )added cdk* to .dockerignore to get it working (which you have already done)
- ) making sure check cdk.json, it should contain:
{
"context": {
"@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": true
}
}
If not specified as true .dockerignore is ignored
answered a year ago
Relevant content
- Accepted Answerasked 2 years ago
- asked 3 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
I cannot add { "context": { "@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": true } } to my cdk.json file as it causes the following error:
Error: Unsupported feature flag '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport'. This flag existed on CDKv1 but has been removed in CDKv2. CDK will now behave as the same as when the flag is enabled.