So:
The official Go build container is based on Alpine.
Alpine uses musl as libc instead of glibc.
I need to build a Go executable in a container that can be run on Ubuntu, which uses glibc.
How do I either
I can't use the Disable CGO solution, as my Go code is a FUSE driver, which requires CGO
The golang:latest
image is based on debian bullseye. You don't need anything else than using this image to build your binary so that it can be run as is on ubuntu.
Just start your dockerfile with this line instead of what you're currently using.
FROM golang:latest