How to dockerize .NET WebAPI lambda on both local and cloud #1489
-
I've generated the .NET WebAPI lambda from the dotnet lambda template For local, I can docker run and test and play around in my local machine. However, I've encountered the error from both docker build Dockerfile.local
Dockerfile
Do we have any official guide on this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
@Fitmavincent Good afternoon. I see multiple issues here:
Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@Fitmavincent Are you using the .NET 7 serverless container image template or upgrading the serverless WebAPI project to .NET 7? Could you please share what Visual Studio template you used to develop your solution and may be share the minimal code solution (with sensitive information removed), may be attached as a ZIP for investigation?
EDIT: Attached is the sample Serverless WebAPI container image project which has both
LocalEntryPoint
andLambdaEntryPoint
. When the code is executed locally, it should executeLocalEntryPoint
and when it is executed in Lamba environment, it should executeLambdaEntryPoint
.ServerlessWebApiNet7.zip
Below is the
Dockerfile
: