Using mac M1 build image, running on linux report
standard_init_linux.go:219: exec user process caused: exec format error
The main reason for this problem is that golang compilation cannot be cross-platform, that is, different systems or different CPU cores will cause this error.
Golang code compiled under linux arm cannot be run under linux X86; similarly, mirroring of projects containing golang code cannot be cross-platform.
The solution is very simple. When building, add the
--platform linux/amd64 parameter
docker build --platform linux/amd64 -t tag