Installed Go binary not found in path on Alpine Linux Docker

前端 未结 6 951
Happy的楠姐
Happy的楠姐 2020-12-22 17:54

I\'ve got a Go binary I\'m trying to run on the Alpine Docker image.

This works fine for the Docker Go binary.

docker run -it alpine:3.3 sh
apk add -         


        
6条回答
  •  醉梦人生
    2020-12-22 18:46

    When building under Debian 9 (Stretch) / Go 1.10.2 and running under Alpine 3.7.0:

    CGO_ENABLED=0 go build
    

    Neither GOOS=linux nor GOARCH=amd6 was necessary.

提交回复
热议问题