Skip to content

arm architecture support for musl builds#112

Merged
stevensbkang merged 2 commits intoportainer:developfrom
Ritish134:Ritish134-patch-1
Mar 9, 2026
Merged

arm architecture support for musl builds#112
stevensbkang merged 2 commits intoportainer:developfrom
Ritish134:Ritish134-patch-1

Conversation

@Ritish134
Copy link
Contributor

fixes #109

@Ritish134 Ritish134 requested a review from deviantony as a code owner March 3, 2026 10:19
@stevensbkang
Copy link
Member

Hey @Ritish134, thanks so much for your contribution!

There are other components those need to be built in ARM/v7 arch as well.

Please review the following 🙂

Native Binaries (must be ARM/ARMHF ELF binaries)

  • containerd-shim-runc-v2 (bin/containerd/bin/containerd-shim-runc-v2)
    • No official ARM32 release — must be cross-compiled via Docker using containerd.Dockerfile
  • runc (bin/runc)
    • Official release available as runc.armhf from github.com/opencontainers/runc
  • CNI plugins; bridge, host-local, portmap, loopback (bin/cni/)
    • Official release cni-plugins-linux-arm-*.tgz from github.com/containernetworking/plugins

Container Images (pulled via crane pull --platform linux/arm)

  • CoreDNS (coredns/coredns:1.14.1)
  • Pause (portainer/pause:latest)
    • Built by build-pause-image.yaml workflow, already includes linux/arm
  • Local Path Provisioner (rancher/local-path-provisioner:v0.0.34)
    • ⚠️ Needs verification
  • Portainer Agent (portainer/agent:2.39.0)
    • Available

@deviantony deviantony removed their request for review March 3, 2026 20:22
@Ritish134
Copy link
Contributor Author

Hi @stevensbkang,

Verified all components from a clean run of download-deps.sh --os=linux --arch=arm.


Native Binaries

Runc

$ file internal/core/embedded/bin/runc
internal/core/embedded/bin/runc: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
statically linked, BuildID[sha1]=b32330155c83b37761c55ca8626b05470c36daa5,
for GNU/Linux 3.2.0, stripped

containerd-shim-runc-v2

$ file internal/core/embedded/bin/containerd/bin/containerd-shim-runc-v2
internal/core/embedded/bin/containerd/bin/containerd-shim-runc-v2: ELF 32-bit LSB executable,
ARM, EABI5 version 1 (SYSV), statically linked,
BuildID[sha1]=35514d5432d798f5d4da3528d093d03efdf97ed3, stripped

CNI Plugins

$ file internal/core/embedded/bin/cni/bridge
internal/core/embedded/bin/cni/bridge: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
statically linked, BuildID[sha1]=257fa12a4f67cb0e6903ea70887cfe361839fc9c,
with debug_info, not stripped

$ file internal/core/embedded/bin/cni/host-local
internal/core/embedded/bin/cni/host-local: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
statically linked, BuildID[sha1]=6f04c04afc496b4b174f5c5bb6dc9a3f680a4ee5,
with debug_info, not stripped

$ file internal/core/embedded/bin/cni/portmap
internal/core/embedded/bin/cni/portmap: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
statically linked, BuildID[sha1]=9d7b6bf013af9c3484ec6dc9fa43ecf65d6dca03,
with debug_info, not stripped

$ file internal/core/embedded/bin/cni/loopback
internal/core/embedded/bin/cni/loopback: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
statically linked, BuildID[sha1]=a99e6e84e54c9ec8910c5c3cc622c91eba2340bf,
with debug_info, not stripped

Dependency Check

No glibc dependencies detected in any of the binaries:

$ readelf -d bin/runc | grep NEEDED                     → (empty)
$ readelf -d bin/containerd-shim-runc-v2 | grep NEEDED  → (empty)
$ readelf -d bin/cni/bridge | grep NEEDED               → (empty)
$ readelf -d bin/cni/host-local | grep NEEDED           → (empty)
$ readelf -d bin/cni/portmap | grep NEEDED              → (empty)
$ readelf -d bin/cni/loopback | grep NEEDED             → (empty)

Image Architecture Verification

CoreDNS

$ crane manifest coredns/coredns:1.14.1 | grep -A2 '"arm"'
"architecture": "arm",
"os": "linux",
"variant": "v7"

Portainer Pause

$ crane manifest portainer/pause:latest | grep -A2 '"arm"'
"architecture": "arm",
"os": "linux",
"variant": "v7"

Rancher Local Path Provisioner

$ crane manifest rancher/local-path-provisioner:v0.0.34 | grep -A2 '"arm"'
"architecture": "arm",
"os": "linux",
"variant": "v7"

Portainer Agent

$ crane manifest portainer/agent:2.39.0 | grep -A2 '"arm"'
"architecture": "arm",
"os": "linux",
"variant": "v7"

End-to-End Validation

Full build and runtime verification on Alpine armv7:

$ make build-musl GOARCH=arm OUTPUT=kubesolo-arm-musl

$ file kubesolo-arm-musl
kubesolo-arm-musl: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, BuildID[sha1]=c4549fc780b893a80ac021d9deff5911c91fb492, stripped

$ readelf -d kubesolo-arm-musl | grep NEEDED
(empty)

$ docker run --rm \
  --platform linux/arm/v7 \
  -v $(pwd):/test \
  alpine:3.19 \
  /test/kubesolo-arm-musl --version
{"level":"info","version":"v1.1.2-dirty","time":"2026-03-05T13:05:43Z","message":"kubesolo version"}

@stevensbkang stevensbkang self-requested a review March 9, 2026 22:05
Copy link
Member

@stevensbkang stevensbkang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for your contribution!

@stevensbkang stevensbkang merged commit a4d402e into portainer:develop Mar 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: musl build support for arm (ARMv7/ARMHF)

2 participants