[aws-lambda]: Add support for Dockerfiles not named Dockerfile in DockerImageCode.fromImageAsset #27549
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
feature-request
A feature should be added or improved.
p2
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the feature
Lambda.DockerImageCode.fromImageAsset expects Docker image instructions files to be named "Dockerfile", and they might not be. Please consider adding support for Docker image instruction files not named "Dockerfile".
Use Case
I have a number of Dockerfiles in a single folder that do not work with Lambda.DockerImageCode.fromImageAsset because it expects Docker image instructions files to be named "Dockerfile". For example, given the list of Docker files below, if I specify
Lambda.DockerImageCode.fromImageAsset(path.resolve(process.cwd(), '../build-utils/docker/dockerfile.lambda.backend'))
, the CDK errors withCannot find file at <root-path>/build-utils/docker/dockerfile.lambda.backend/Dockerfile
.Docker files e.g.:
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.89.0 (build 2ad6683)
Environment details (OS name and version, etc.)
Mac Ventura 13.5.2
The text was updated successfully, but these errors were encountered: