aws-ecr-assets: support for .containerignore file and / or alternative ignore file
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 74
Description
### Describe the feature
Podman supports two different ignore file variants: `.dockerignore` (for compatibility reasons) and `.containerignore`, see https://docs.podman.io/en/stable/markdown/podman-build.1.html#files. Moreover, it's possible to provide alternative ignore file.
But, `.dockerignore` file name is hardcoded in aws cdk:
https://github.com/aws/aws-cdk/blob/aebb331e60b736969f5bccbf5b427e11dc5fc997/packages/aws-cdk-lib/aws-ecr-assets/lib/image-asset.ts#L454
### Use Case
.containerignore natively supported by Podman is ignored by aws cdk, which force me to rename file or use include / exclude properties.
### Proposed Solution
To add ability to specify alternative ignore file (as it already implemented for Dockerfile itself), and / or support vendor-free file names by default (Containerfile / .containerignore).
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.178.2
### Environment details (OS name and version, etc.)
mac os
Contributor guide
Research direction
Start in packages/aws-cdk-lib/aws-ecr-assets/lib/image-asset.ts at the hardcoded .dockerignore handling, and compare it with the existing Dockerfile selection behavior. Clarify whether the change should support an explicitly selected ignore file, .containerignore by default, or both; done means the chosen behavior works for Podman-compatible builds without requiring renaming or include/exclude workarounds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, typescript
- Domain
- cloud, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100