fix(ecr-assets): honor <dockerfile>.dockerignore when staging DockerImageAsset - #38635
Open
hassaku63 wants to merge 4 commits into
Open
fix(ecr-assets): honor <dockerfile>.dockerignore when staging DockerImageAsset#38635hassaku63 wants to merge 4 commits into
hassaku63 wants to merge 4 commits into
Conversation
…ssets (under feature flag) DockerImageAsset always read context-root .dockerignore. Match Docker's sibling ignore file behind an ApiDefault flag so existing apps stay on the historic behavior.
Inline flag-off expectations and simplify describe title after review feedback.
Deploy-time pass oracle with Dockerfile.Custom and sibling ignore; flag enabled via postCliContext.
Remove redundant .dockerignore and keep-me.txt; regenerate snapshot for the 3-file fixture and updated pass-oracle Dockerfile comments.
hassaku63
requested a deployment
to
test-pipeline
August 22, 2026 14:18 — with
GitHub Actions
Waiting
aws-cdk-automation
previously requested changes
Aug 22, 2026
aws-cdk-automation
dismissed
their stale review
August 22, 2026 14:20
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
aws-cdk-automation
requested a deployment
to
test-pipeline
August 22, 2026 15:18 — with
GitHub Actions
Waiting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue # (if applicable)
Closes #17686
Reason for this change
Multiple
DockerImageAssetresources often share one build context but use different Dockerfiles, each with its own<dockerfile>.dockerignore. CDK staging only read the context-root.dockerignore, so per-image ignore rules were not applied andassetHashincluded unrelated files. Docker already supports Dockerfile-specific ignore files; CDK did not.Description of changes
Adds ApiDefault flag
@aws-cdk/aws-ecr-assets:dockerfileSpecificIgnoreFileso staging follows Docker's ignore-file selection when enabled. Existing apps keep current behavior until the flag is set. No new construct props. README and feature-flag docs updated.Describe any new or updated permissions being added
None
Description of how you validated changes
unit, integ test
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license