• 编译时添加参数CGO_ENABLED=0,关闭CGO就可以了:
CGO_ENABLED=0 go build main.go

alpine版本

docker pull alpine:3.17.3
docker pull alpine:3.17
docker pull alpine:3.16
docker pull alpine:3.15.8
docker pull alpine:3.14.10
docker pull alpine:3.13