Skip to content
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

Open
SilasCrosby opened this issue Nov 15, 2024 · 1 comment
Open

Bug: Dotnet 8 Container Image Arm64 Issue #7691

SilasCrosby opened this issue Nov 15, 2024 · 1 comment
Labels
area/build sam build command

Comments

@SilasCrosby
Copy link

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

  1. WSL2 Ubuntu 20.04 on Windows 11 24H2
  2. sam --version
  3. AWS region 'us-east-1'
# Paste the output of `sam --info` here
{
  "version": "1.127.0",
  "system": {
    "python": "3.11.10",
    "os": "Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.31"
  },
  "additional_dependencies": {
    "docker_engine": "27.2.1",
    "aws_cdk": "Not available",
    "terraform": "Not available"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}


Still the same: 
2024-11-15 16:05:15,958 | Telemetry response: 200                                                                                                                                                                                                                                                                      
Error: The command '/bin/sh -c dotnet tool install -g Amazon.Lambda.Tools' returned a non-zero code: 139
2024-11-15 16:05:15,967 | Telemetry response: 200     
@SilasCrosby SilasCrosby added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Nov 15, 2024
@mndeveci
Copy link
Contributor

change build image to
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim-arm64v8 AS build-image

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?

@mndeveci mndeveci added area/build sam build command and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build sam build command
Projects
None yet
Development

No branches or pull requests

2 participants