Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker base image chainguard #368

Merged
merged 3 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dockerfiles/agent/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM golang:1.22 AS builder
FROM cgr.dev/chainguard/go:latest AS builder

WORKDIR /
COPY ./ ./

Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/agent/git/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM golang:1.22 AS builder
FROM cgr.dev/chainguard/go:latest AS builder

WORKDIR /
COPY ./ ./

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

WORKDIR /workspace
# Copy the Go Modules manifests
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 golang:alpine
FROM scratch
WORKDIR /
COPY --from=builder /workspace/k8smetrics_client .
USER 65532:65532
Expand Down
5 changes: 2 additions & 3 deletions dockerfiles/migration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM golang:1.22 as builder

FROM cgr.dev/chainguard/go:latest AS builder
WORKDIR /workspace
COPY ./ ./
RUN go mod download
Expand All @@ -10,7 +9,7 @@ RUN chmod +x /workspace/script/wait-for-clickhouse.sh

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM golang:alpine
FROM cgr.dev/chainguard/wolfi-base
RUN apk add --no-cache netcat-openbsd
WORKDIR /
COPY --from=builder /workspace/migration .
Expand Down
Loading