standard_init_linux.go:190: exec user process caused “exec format error”
by admin on Feb.11, 2019, under Programming
When running a compiled Go application inside a Docker container one may encounter an error message reading:
standard_init_linux.go:190: exec user process caused “exec format error”
Developers tend to use different operating systems and it’s possible you simply built the code for the wrong operating system (or CPU architecture).
GOOS=linux go build -o main
Should work properly afterwards.