fix(docker): compile goose for target architecture to prevent ARM exec-format errors #466

Closed
opened 2026-04-05 16:16:31 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @iAmBipinPaul on 9/11/2025

This pull request updates the backend build stage in the Dockerfile to ensure Go tools are installed for the correct target architecture. The most important change is switching from downloading a prebuilt binary for goose to using go install, which compiles the binary for the intended architecture and prevents runtime errors on platforms like ARM.

Backend build improvements:

  • Modified the installation of the goose tool to use go install with GOOS and GOARCH environment variables, ensuring the binary matches the target architecture and avoiding exec format errors.
  • Added ARG TARGETOS and ARG TARGETARCH to make target architecture variables available early in the build process.
*Originally created by @iAmBipinPaul on 9/11/2025* This pull request updates the backend build stage in the `Dockerfile` to ensure Go tools are installed for the correct target architecture. The most important change is switching from downloading a prebuilt binary for `goose` to using `go install`, which compiles the binary for the intended architecture and prevents runtime errors on platforms like ARM. **Backend build improvements:** * Modified the installation of the `goose` tool to use `go install` with `GOOS` and `GOARCH` environment variables, ensuring the binary matches the target architecture and avoiding exec format errors. * Added `ARG TARGETOS` and `ARG TARGETARCH` to make target architecture variables available early in the build process.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/databasus#466