Skip to content

Improve Docker support for ARM #1050

Closed
Closed

Description

@mockdeep

Currently our Docker image is built for amd64. We should figure out a way to also support ARM, since it is not uncommon for users to want to run Stringer on a Raspberry Pi or the like. Having very little experience with Docker, I'm not sure how to proceed with this, but it might require creating a second image that people can pull for ARM devices.

Activity

  1. mockdeep commented on Jul 5, 2023

    @mockdeep
    CollaboratorAuthor

    @guidopetri pinging you on this one. Even if you don't have time to make a PR, it would be super helpful if you could outline the steps I could take to point me in the right direction.

  2. guidopetri commented on Jul 6, 2023

    @guidopetri
    Collaborator

    For sure. Apart from the issue mentioned in this comment where we hardcode amd64, there don't seem to be any issues with building an image for ARM (and I'm guessing there won't be for ARM64 either, and I'll verify that as soon as my newest raspberry pi arrives :) ). So I think the steps are:

    • implement automated image building e.g. via CI
    • un-hardcode the amd64, using an ARG directive in docker instead that is essentially a CLI arg passed in at build time
    • extend the automated image building to ARM/ARM64 by targeting that platform during build with --platform + using the ARG
  3. mockdeep commented on Jul 6, 2023

    @mockdeep
    CollaboratorAuthor

    @guidopetri thank you! We're running on CircleCI, so we should be able to take advantage of ARM support there.

  4. guidopetri commented on Jul 6, 2023

    @guidopetri
    Collaborator

    I started a PR here to track this work

  5. guidopetri commented on Jul 8, 2023

    @guidopetri
    Collaborator

    With the second bullet point done, I'll see about setting up the docker image build via CircleCI next. I'm not super familiar with it so it may take me a moment.

  6. mockdeep commented on Jul 9, 2023

    @mockdeep
    CollaboratorAuthor

    Thanks @guidopetri! I'm pretty familiar with CircleCI, so let me know if you get stuck on anything there. I suspect I'll have to configure it with a couple of env variables to publish to docker.

  7. mockdeep commented on Jul 9, 2023

    @mockdeep
    CollaboratorAuthor

    Also, in case you haven't come across it already, CircleCI provides an orb for Docker stuff.

  8. guidopetri commented on Aug 21, 2023

    @guidopetri
    Collaborator

    With #1080 , we now have the first bullet point done as well, and part of the third one. I'll investigate the image that was generated for arm64, but it looks like Github Actions simply allows us to build both platforms.

    However, even if the image looks fine, we still need to update the CI to pass the platform build arg into the build; the arm64 image used superchronic's amd64 executable. I'll try and create the followup PR this next week.

  9. guidopetri commented on Aug 26, 2023

    @guidopetri
    Collaborator

    #1092 should close this issue :)

  10. mockdeep commented on Aug 26, 2023

    @mockdeep
    CollaboratorAuthor

    Thanks for all your work on this @guidopetri!

  11. mockdeep commented on Feb 3, 2025

    @mockdeep
    CollaboratorAuthor

    Reopening this. The ARM build has a bunch of errors, including segmentation faults when compiling native extensions. I'm not sure where to start with this, but I've opened an issue on the Ruby docker image for starters.

  12. mockdeep commented on Feb 3, 2025

    @mockdeep
    CollaboratorAuthor

    And now we can close this again. #1278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions