Skip to content

Commit

Permalink
Use more recent packages in container
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Trent <[email protected]>
  • Loading branch information
trent-s committed Jul 2, 2024
1 parent 0bb6007 commit 303d2d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# Copy the Go Modules manifests (go.sum and go.mod)
COPY go.* .
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
RUN apk upgrade --no-cache && \
go mod download

# Copy the go source
COPY cmd/main.go cmd/main.go
Expand All @@ -25,8 +25,8 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o ma

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
# FROM gcr.io/distroless/static:debug
FROM gcr.io/distroless/static-debian12:nonroot
# FROM gcr.io/distroless/static-debian12:debug
WORKDIR /
COPY --from=builder /workspace/manager .
COPY cmd/debug-entrypoint.sh .
Expand Down

0 comments on commit 303d2d0

Please sign in to comment.