Skip to content

Docker Builds for linux/arm, linux/arm64 #468

@rehashedsalt

Description

@rehashedsalt

Desired Behavior

Container images on Dockerhub and Quay should include builds for the following architectures in addition to linux/amd64:

  • linux/arm
  • linux/arm64

Contrast to Current Behavior

Current container images only support linux/amd64.

Changes Required

Presumably just build scripts, but any automated testing might need to be adjusted as well. I was able to build an image just fine by adding this to build.sh (with HEAD at cb5ffa0, for the context of the diff):

diff --git a/build.sh b/build.sh
index 82084bf..65a896c 100755
--- a/build.sh
+++ b/build.sh
@@ -352,6 +352,7 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
     if [ -n "${NO_PROXY}" ]; then
       DOCKER_BUILD_ARGS+=(--build-arg "no_proxy=${NO_PROXY}")
     fi
+    DOCKER_BUILD_ARGS+=(--platform "linux/arm,linux/arm64,linux/amd64")
 
     ###
     # Building the docker image

I'd PR this in, but this lame edit makes a ton of assumptions about your build system.

Discussion: Benefits and Drawbacks

The biggest gain from adding these images is direct support for deployment to smaller machines like the Raspberry Pi. I, like a growing number of people, like to use a cluster of Pis as a cheap but effective lab environment. It'd be very nice to use the upstream Netbox image in my k8s cluster instead of having to rely on rebuilds.

It's not a terribly new change, either: the linuxserver/netbox image has supported these architectures for some time now.

Naturally, drawbacks will include widened support, but the odds of another couple architectures affecting this repo in particular are basically nil. If anything, it would give ARM-specific bugs in Netbox more exposure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue describes an enhancement that we would like to implement in the future.help wantedWe seek out help for implementing this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions