-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Dotnet 8 Container Image Arm64 Issue #7691
Comments
Thanks for reporting this issue, may I ask why did you change the image before starting the build? Does building succeed if you use the original image? |
No Sir, I still get the Exit code 139, Okay, I think I was having trouble with the base Microsoft image and switched to the bullseye image for more stability. I tried building with just regular docker and got the below error: I updated QEMU running the command I built the package again for dotnet 8 and got the below: Error: The command '/bin/sh -c if [ "$SAM_BUILD_MODE" = "debug" ]; then dotnet lambda package --configuration Debug; else dotnet lambda package --configuration Release; fi' returned a non-zero code: 255 I think QEMU binaries needed updated, troubleshooting this error now. |
Well, I was not able to get this to run correctly as an arm64 image, I gave up and switched the function back to x86_64 and dotnet8, rather than dotnet6 and arm64/graviton. I was able to build the function locally under arm64 using sam build, but running the command This is the Error I'm getting: 24.68 Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object. Here is my dockerfile: FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim-arm64v8 AS build-image FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-imageUSER appARG FUNCTION_DIR="/build" RUN apt-get update && apt-get -y install zip RUN mkdir $FUNCTION_DIR Build and Copy artifacts depending on build mode.RUN mkdir -p build_artifacts FROM public.ecr.aws/lambda/dotnet:8-arm64 COPY --from=build-image /build/build_artifacts/ /var/task/ Command can be overwritten by providing a different command in the template directly.CMD ["Solution::Solution.Function::FunctionHandler"] |
Description:
Getting non-zero code 139 when updating dotnet 6 docker file to dotnet 8, for container lambda functions, also occurs on sam init with hello world container lambda function creation.
Steps to reproduce:
sam init hello world, select container image type.
add "function-architecture": "arm64",
change build image to
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim-arm64v8 AS build-image
delete Samconfig.toml
Change Template to include
Architectures:
- arm64
Observed result:
Error: The command '/bin/sh -c dotnet tool install -g Amazon.Lambda.Tools' returned a non-zero code: 139
Expected result:
sam build successfully.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
WSL2 Ubuntu 20.04 on Windows 11 24H2
sam --version
The text was updated successfully, but these errors were encountered: