Skip to content

Commit

Permalink
update: Added chainguard image as base image
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjino committed May 14, 2024
1 parent 0ab7fd4 commit 16b7091
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/agent/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY ./ ./
RUN go mod download
RUN CGO_ENABLED=0 go build -o ./build/agent agent/container/main.go

FROM cgr.dev/chainguard/static:latest
FROM scratch
COPY --from=builder ./build/agent agent

USER 65532:65532
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/agent/git/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY ./ ./
RUN go mod download
RUN CGO_ENABLED=0 go build -o ./build/agent agent/git/main.go

FROM cgr.dev/chainguard/static:latest
FROM scratch
COPY --from=builder ./build/agent agent

USER 65532:65532
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build the manager binary
FROM cgr.dev/chainguard/go:latest AS builder

RUN apk update && apk add go-1.21
WORKDIR /workspace
# Copy the Go Modules manifests
COPY ./ ./
Expand All @@ -11,7 +11,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o k8smetri

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM cgr.dev/chainguard/static:latest
FROM scratch
WORKDIR /
COPY --from=builder /workspace/k8smetrics_client .
USER 65532:65532
Expand Down

0 comments on commit 16b7091

Please sign in to comment.