Merge pull request #1058 from antontroshin/fix-go-tutorial-docker-build

Fix distributed calculator tutorial Go docker build
This commit is contained in:
Paul Yuknewicz 2024-07-24 09:16:32 -07:00 committed by GitHub
commit 407cebd2aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -1,11 +1,10 @@
#first stage - builder
FROM golang:1.15-buster as builder
FROM golang:1.22-bookworm as builder
WORKDIR /dir
COPY app.go .
RUN go get -d -v
COPY app.go go.mod go.sum ./
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
#second stage
FROM debian:buster-slim
FROM debian:bookworm-slim
WORKDIR /root/
COPY --from=builder /dir/app .
CMD ["./app"]