go docker $GOPATH/go.mod exists but should not The command '/bin/sh -c go mod download go build -o main' returned a non-zero code: 1 code example
Example 1: go docker $GOPATH/go.mod exists but should not The command '/bin/sh -c go mod download go build -o main' returned a non-zero code: 1
add into your dockerfile
apt install golang -y
work perfect
Example 2: go docker $GOPATH/go.mod exists but should not The command '/bin/sh -c go mod download go build -o main' returned a non-zero code: 1
add into your dockerfile
apt install golang -y
work perfect