From eb5b8be08d3efd504bcc5244887779d7b64312c5 Mon Sep 17 00:00:00 2001 From: Siddhartha Basu Date: Fri, 11 Aug 2023 09:22:28 -0500 Subject: [PATCH] chore(Dockerfile): update base image to golang:1.20.6-bullseye and remove unnecessary environment variables The base image for the Dockerfile has been updated to golang:1.20.6-bullseye to use a more recent version of Golang. The environment variables GO111MODULE and CGO_ENABLED have been removed as they are not needed for the build process. --- build/package/Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/build/package/Dockerfile b/build/package/Dockerfile index 5ec4f88..e43aa2a 100644 --- a/build/package/Dockerfile +++ b/build/package/Dockerfile @@ -1,8 +1,7 @@ -FROM golang:1.13.15-buster AS builder +FROM golang:1.20.6-bullseye AS builder LABEL maintainer="Siddhartha Basu " ENV GOPROXY https://proxy.golang.org -ENV GO111MODULE=on \ - CGO_ENABLED=0 \ +ENV CGO_ENABLED=0 \ GOOS=linux \ GOARCH=amd64 RUN apt-get -qq update \ @@ -24,9 +23,8 @@ RUN go build \ -tags netgo \ -o /bin/app \ main.go -RUN strip /bin/app \ - && upx -q -9 /bin/app +RUN upx -q -9 /bin/app FROM gcr.io/distroless/static COPY --from=builder /bin/app /usr/local/bin/ -ENTRYPOINT ["/usr/local/bin/app"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/app"]