Skip to content

Commit

Permalink
chore(Dockerfile): update base image to golang:1.20.6-bullseye and re…
Browse files Browse the repository at this point in the history
…move 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.
  • Loading branch information
cybersiddhu committed Aug 11, 2023
1 parent b0c5273 commit eb5b8be
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions build/package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM golang:1.13.15-buster AS builder
FROM golang:1.20.6-bullseye AS builder
LABEL maintainer="Siddhartha Basu <[email protected]>"
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 \
Expand All @@ -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"]
ENTRYPOINT ["/usr/local/bin/app"]

0 comments on commit eb5b8be

Please sign in to comment.