Last active
February 14, 2025 19:42
-
-
Save dabbinavo/7f84ea429fcba5f329fbbc4962649546 to your computer and use it in GitHub Desktop.
.NET: Build NativeAOT enabled linux-arm on x64 host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker build -t dotnet-cross-linux-arm:latest . | |
docker run --rm -v /path/to/project/:/myapp -w /myapp dotnet-linux-cross-arm:latest dotnet publish -r linux-arm -p:LinkerFlavor=lld -p:ObjCopy=llvm-objcopy -p:SysRoot=/crossrootfs/arm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-arm-net9.0 | |
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 9.0 | |
RUN ln -s /root/.dotnet/dotnet /usr/bin/dotnet | |
CMD ["/bin/bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment