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 changes #364

Closed
wants to merge 2 commits into from
Closed
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
5 changes: 3 additions & 2 deletions dockerfiles/agent/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM golang:1.19 AS builder
FROM cgr.dev/chainguard/go:latest AS builder

WORKDIR /
COPY ./ ./

RUN go mod download
RUN CGO_ENABLED=0 go build -o ./build/agent agent/container/main.go

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

USER 65532:65532
Expand Down
5 changes: 3 additions & 2 deletions dockerfiles/agent/git/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM golang:1.19 AS builder
FROM cgr.dev/chainguard/go:latest AS builder

WORKDIR /
COPY ./ ./

RUN go mod download
RUN CGO_ENABLED=0 go build -o ./build/agent agent/git/main.go

FROM scratch
FROM cgr.dev/chainguard/static:latest
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,5 +1,5 @@
# Build the manager binary
FROM golang:1.20 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 cgr.dev/chainguard/static:latest
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.20 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