Skip to content

Commit

Permalink
Merge pull request #368 from intelops/baseimage
Browse files Browse the repository at this point in the history
docker base image chainguard
  • Loading branch information
jebinjeb authored May 17, 2024
2 parents 1f965d9 + 5f14549 commit c212004
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
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

0 comments on commit c212004

Please sign in to comment.