upgrade to go 1.16.0

This commit is contained in:
Rui Lopes 2021-02-28 12:41:35 +00:00
parent ef305dec04
commit c51eb56007
1 changed files with 8 additions and 3 deletions

View File

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