standard_init_linux.go:178: exec user process caused “no such file or directory”

Golang Docker Build runs an error after making the input
The problem arises because the environment in which you are compiling is different from the environment in which you are running, and may have dependencies on dynamic libraries
1. By default, go USES static linking and dynamic compilation is used in Docker’s Golang environment.
2. If you want to compile +alpine to deploy with docker, you can do so by disabling cgoCGO_ENABLED=0.
3. If you want to use cgo, make GCC statically compiled by go build --ldflags "-extldflags -static".
 
 
 
Reference: https://yryz.net/post/golang-docker-alpine-start-panic.html
 

Reproduced in: https://www.cnblogs.com/davygeek/p/10969434.html

Read More: