diff --git a/dockerfiles/agent/container/Dockerfile b/dockerfiles/agent/container/Dockerfile index 686e2d74..5aa13a3f 100644 --- a/dockerfiles/agent/container/Dockerfile +++ b/dockerfiles/agent/container/Dockerfile @@ -1,12 +1,12 @@ -FROM golang:1.19 AS builder +FROM cgr.dev/chainguard/go:1.20 AS base WORKDIR / COPY ./ ./ -RUN go mod download -RUN CGO_ENABLED=0 go build -o ./build/agent agent/container/main.go +RUN go mod download \ + && CGO_ENABLED=0 go build -o ./build/agent agent/container/main.go FROM scratch -COPY --from=builder ./build/agent agent +COPY --from=base ./build/agent agent USER 65532:65532 -ENTRYPOINT ["/agent"] +ENTRYPOINT [ "/agent" ]