aws-ecr-assets: support for .containerignore file and / or alternative ignore file #33426
Labels
@aws-cdk/aws-ecr-assets
Related to AWS CDK Docker Image Assets
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p3
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:aws-cdk/packages/aws-cdk-lib/aws-ecr-assets/lib/image-asset.ts
Line 454 in aebb331
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
CDK version used
2.178.2
Environment details (OS name and version, etc.)
mac os
The text was updated successfully, but these errors were encountered: