Installed Go binary not found in path on Alpine Linux Docker

前端 未结 6 1056
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:41

    I compiled go binary in alpine with these options

    GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o [name of binary]
    

    It worked.

提交回复
热议问题