Swift Docker images for ARM (Raspberry Pi, etc)

I recently released a project that includes a set of unofficial Docker images for Swift on ARM devices.

I'm hoping to gauge community interest and understand the feasibility of having official Docker images for Swift on ARM.

There have been a couple of GitHub issues discussing this on the swift-docker repo, but the issues are a bit old and seem to have fizzled out.

One of the main challenges with official Docker images for Swift on ARM, as @Helge_Hess1 has mentioned, is that swift.org does not provide pre-built ARM binaries.

I've been using community provided pre-built binaries (from @uraimo and @futurejones) for the Swift on Balena project, but I assume we'd need official Docker images to build Swift from source.

I'd love to know what people think about this and what possible next steps could be to move toward having official Docker images for ARM.

6 Likes

I believe the official docker images are maintained by @IanPartridge and friends.

For my part I'd really like to have official ARM docker images. I'm investing more time into thinking about CIing SwiftNIO (and particularly SwiftNIO SSL, which contains a bunch of assembly that varies on different platforms and architectures) on ARM in various forms, so having ARM (particularly aarch64) images would be really nice.

3 Likes

I'd also like to have Docker images for more platforms.

But as these are official Docker images of the Swift project, it's important that users can trust the provenance and integrity of the images. An important part of this is that the images verify that the build is correctly signed.

So I think to deliver ARM images would require ARM builds to be provided at https://swift.org/download/#releases with signatures.

2 Likes

This allows me to mention something else that I've been thinking about lately.

As Swift's cross-platform story matures, we should provide a clear path for platforms to be accepted on swift.org/download and criteria for official/unofficial builds.

https://github.com/apple/swift-community-hosted-continuous-integration was a great start but it seems to me like Swift would benefit from a workgroup similar in spirit to https://nodejs.org/en/about/working-groups/#build which would allow the community to work together on Swift's build/packaging/cross-platform/release/delivery. The Docker images would be a natural part of this.

CC: @tkremenek @compnerd

6 Likes

That seems like an interesting idea. The build and distribution story currently is a pain point. I have been trying to find ways to simplify it for Windows and I know that I have mentioned to @jrose that I would like to see some changes in the way that we deal with the SDK components so that we can enable more deployment scenarios. But, yes, this is an area where a concerted effort could be beneficial.

@IanPartridge Thanks for the detailed reply – all of that makes sense to me.

I'd love to see a path forward for the community to contribute official/unofficial builds to swift.org.

cc @futurejones @uraimo

1 Like