upgrade to go 1.16.0
This commit is contained in:
parent
ef305dec04
commit
c51eb56007
|
|
@ -58,11 +58,16 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
cat >go.mod <<'EOF'
|
||||||
|
module example.com/go-hello
|
||||||
|
|
||||||
|
go 1.16
|
||||||
|
EOF
|
||||||
cat >Dockerfile <<'EOF'
|
cat >Dockerfile <<'EOF'
|
||||||
FROM golang:1.14.1-buster as builder
|
FROM golang:1.16.0-buster as builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY main.go .
|
COPY go.* main.go ./
|
||||||
RUN CGO_ENABLED=0 go build -ldflags="-s" -o=go-hello
|
RUN CGO_ENABLED=0 go build -ldflags="-s"
|
||||||
|
|
||||||
# NB we use the buster-slim (instead of scratch) image so we
|
# NB we use the buster-slim (instead of scratch) image so we
|
||||||
# can enter the container to execute bash etc.
|
# can enter the container to execute bash etc.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue