Skip to content

Running dotnet core on Alpine for ARM32  #2021

Closed

Description

@JensNordenbro

Due to its small footprint (OS image size), Alpine is suited for embedded scenarios on ARM32.

Things leading to this:

  • Today dotnet core is supported on ARM32.
  • Today dotnet core 2.1 is running on Alpine for x86.
  • Today dotnet core 3.1 is running on Alpine for ARM64.

It is expected to have symmetry in OS support between different CPU architectures where possible.

(If/when this is implemented the docker images for running .net core application should be available. )

This is a fork of https://github.com/dotnet/coreclr/issues/17468

Activity

  1. added
    untriaged
    on Jan 22, 2020
  2. changed the title [-]Running dotnet core on Alpine for ARM32 #17468[/-] [+]Running dotnet core on Alpine for ARM32 [/+] on Jan 22, 2020
  3. added this to the 5.0 milestone on Feb 28, 2020
  4. added
    enhancement
    and removed
    untriaged
    on Feb 28, 2020
  5. ericstj commented on Feb 28, 2020

    @ericstj
    Member

    Current support matrix https://github.com/dotnet/core/blob/master/release-notes/3.1/3.1-supported-os.md#linux

    It seems this is a request to add Alpine ARM32 to this. @leecow / @jeffschwMSFT do you know if this is something that's been considered? Are there any technical blockers? /cc @wfurt

    Marking as 5.0 to answer the question.

  6. janvorli commented on Feb 28, 2020

    @janvorli
    Member

    @ericstj There are no technical blockers. It is just about wiring it to our build lab / docker containers (whcih includes rootfs creation). Maybe RID graph, I'm not sure whether we already have it covered or not. Otherwise I believe it should just work.

  7. JensNordenbro commented on Mar 2, 2020

    @JensNordenbro
    Author

    Alsö @ericstj ; work was done on 17468 in the old repo.

  8. ericstj commented on Mar 2, 2020

    @ericstj
    Member

    Alpine is only x64 in rid graph:

    <RuntimeGroup Include="alpine">
    <Parent>linux-musl</Parent>
    <Architectures>x64</Architectures>
    <Versions>3.6;3.7;3.8;3.9;3.10;3.11</Versions>
    </RuntimeGroup>

    Seems like that's not even consistent with the matrix.

  9. janvorli commented on Mar 2, 2020

    @janvorli
    Member

    That's strange as we've supported Alpine on ARM64 since 3.0 (see https://hub.docker.com/_/microsoft-dotnet-core-runtime-deps/, the Linux arm64 tags)

  10. ericstj commented on Mar 2, 2020

    @ericstj
    Member

    Alsö @ericstj ; work was done on 17468 in the old repo.

    Looks to be #10111 in new repo.

  11. ericstj commented on Mar 2, 2020

    @ericstj
    Member

    That's strange as we've supported Alpine on ARM64 since 3.0 (see https://hub.docker.com/_/microsoft-dotnet-core-runtime-deps/, the Linux arm64 tags)

    Looking at the product assets I see it was treated as linux-musl-arm64 so that works from shared-fx but would fail for folks trying to resolve from alpine.ver-arm64 in a self-contained publish.

  12. hamish-milne commented on Jun 16, 2020

    @hamish-milne

    Is it possible to get a build of this working at present, perhaps using the instructions here #10111 (comment) ? I've tried publishing a simple app with the linux-musl-arm RID, which works, but execution fails with Illegal instruction at __stack_chk_fail (some incompatibility with alpine's stack-protection-by-default?)

    Happy to help out with this as it's very relevant to my interests :)

  13. 21 remaining items

  14. janvorli commented on Jan 25, 2021

    @janvorli
    Member

    They were already created few days ago: dotnet/dotnet-docker#2443

  15. JensNordenbro commented on Jan 25, 2021

    @JensNordenbro
    Author

    nice!

    what is the condition to close this item? It seems done but not released to me!

  16. mthalman commented on Feb 18, 2021

    @mthalman
    Member
  17. ccifuentesfer commented on Jul 7, 2021

    @ccifuentesfer

    Hello,
    We need to move to arm32 some of our IoT code, currently seems that the only option is going back to C :/
    Is there any update on this issue? And also, is there any preview version we can use to test?

    Best regards,

  18. mthalman commented on Jul 7, 2021

    @mthalman
    Member

    @ccifuentesfer - Which version of .NET are you wanting? It's available in the latest servicing release of 5.0.

    @rbhanda - Can we get download links for Arm Alpine added to the release notes going forward?

    @janvorli - Can this issue be closed?

  19. janvorli commented on Jul 8, 2021

    @janvorli
    Member

    Yes, it can be closed. There are no known remaining issues.

  20. ccifuentesfer commented on Jul 8, 2021

    @ccifuentesfer

    Hello,
    I have tried with versions:
    5.0.301
    6.0.100-preview.5.21302.13

    with runtime linux-musl-arm and self-contained, the executable uses ld-linux-armhf.so.3 libc library.

    Thanks for your reply!

  21. janvorli commented on Jul 8, 2021

    @janvorli
    Member

    I've just tried with 5.0.301 SDK:

    mkdir test
    cd test
    dotnet new console
    dotnet publish -r linux-musl-arm --self-contained

    And then:

    objdump -x bin/Debug/net5.0/linux-musl-arm/publish/test | grep NEEDED
      NEEDED               libstdc++.so.6
      NEEDED               libgcc_s.so.1
      NEEDED               libc.musl-armv7.so.1
    

    or

    strings bin/Debug/net5.0/linux-musl-arm/publish/test | grep musl
    /lib/ld-musl-armhf.so.1
    libc.musl-armv7.so.1
    
  22. ccifuentesfer commented on Jul 15, 2021

    @ccifuentesfer

    Thanks @janvorli it's working now!

    The project had the target framework set to netcoreapp3.1, as soon as I changed it to net5.0 has been solved.

  23. janvorli commented on Jul 15, 2021

    @janvorli
    Member

    @ccifuentesfer great, thank you for confirming that!

  24. ghost locked as resolved and limited conversation to collaborators on Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-Metaenhancementos-alpine

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions