#Multi-architecture docker building errors

1 messages · Page 1 of 1 (latest)

formal dragon
#

Having issues with multi-architecture docker-building from our gitlab runners.

Runners are amd64. We've tried both arm64 and amd64 Dagger engines, both result in common arch errors whilst building arm64/amd64 images.

Examples:

  • Amd64 runner, amd64 engine, building aarch64 image: Error while loading /usr/local/bin/yq: Exec format error

  • Amd64 runner, arm64 engine, building amd64 image: internal/goos: /usr/local/go/pkg/tool/linux_amd64/compile: signal: segmentation fault (core dumped)

In both cases, both arm64 and amd64 build fine locally on arm64 macos.

What is best practice here? Why do they build locally but not remote?

One possible (but uninvestigated) cause is something to do with Golang. Yq is written in Go, the second image is a Golang image which errored on installing gotestsum

spice stream
formal dragon
#

Downloading the binary, typically just from apt/apk depending on base image

spice stream
#

I recall seeing that error when some base image don't publish multi-arch variants

formal dragon
#

I'd assume so since it builds both archs locally, but I'd have to check to be sure

spice stream
formal dragon
#

I'm off work until 19th January, but when I return I can send you the module + Dockerfiles to recreate

spice stream
# formal dragon I'm off work until 19th January, but when I return I can send you the module + D...

hey MB! I've tried to repro this issue in Gitlab unsuccessfully. Here's a sample repo (https://gitlab.com/marcosnils/dagger-ci-test) which runs a gitlab job that uses the alpine image, installs yq and then executes it in both architectures successfuly. https://gitlab.com/marcosnils/dagger-ci-test/-/jobs/12547095917#L512 and https://gitlab.com/marcosnils/dagger-ci-test/-/jobs/12547095917#L497

Check it out and let me know if you have any questions

formal dragon
#

What architectures are your runner/engine here?

spice stream
#

and as you can see it's using an aarch64 alpine image and install yq

#

and it's able to execute it correctly

formal dragon
#

Must be something specific to our setup. Both arch image builds work locally. I'll pick this up mid-January, thanks for looking into it