1

I want to build a .NET application inside a Docker container on a Raspberry Pi 3B+. dotnet build or publish, and even --version returns error code 132.

docker build -t consoletest .

Sending build context to Docker daemon  4.608kB
Step 1/5 : FROM mcr.microsoft.com/dotnet/sdk:6.0.302-alpine3.16-arm32v7 AS build
 ---> de9190893e15
Step 2/5 : RUN dotnet --version
 ---> Running in 71c0dc4f9595
The command '/bin/sh -c dotnet --version' returned a non-zero code: 132

Dockerfile

FROM mcr.microsoft.com/dotnet/sdk:6.0.302-alpine3.16-arm32v7 AS build

RUN dotnet --version

lscpu

Architecture:        armv7l
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
Vendor ID:           ARM
Model:               4
Model name:          Cortex-A53
Stepping:            r0p4
CPU max MHz:         1400.0000
CPU min MHz:         600.0000
BogoMIPS:            89.60
Flags:               half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32

1 Answer 1

1

My mistake, I guess. I was not aware anymore that I set up the 3B+ with 32-bit Raspbian. After a re-installation with 64-bit Raspbian, Docker... this worked:

>docker run -it --entrypoint /bin/sh mcr.microsoft.com/dotnet/sdk:6.0-alpine
/ # dotnet --version
6.0.302

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.