Skip to content

Commit

Permalink
Change base images and run as non-root (#93)
Browse files Browse the repository at this point in the history
Addresses #71

Co-authored-by: Mariano Uvalle <[email protected]>
  • Loading branch information
AYM1607 and Mariano Uvalle authored Mar 27, 2024
1 parent f4adcd9 commit 4428ef4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docker/eno-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -ldflags="-s -w" ./cmd/eno-controller

FROM scratch
FROM gcr.io/distroless/static

# https://github.com/GoogleContainerTools/distroless/blob/16dc4a6a33838006fe956e4c19f049ece9c18a8d/common/variables.bzl#L18
USER 65532:65532

COPY --from=builder /app/eno-controller /eno-controller
ENTRYPOINT ["/eno-controller"]
6 changes: 5 additions & 1 deletion docker/eno-reconciler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -ldflags="-s -w" ./cmd/eno-reconciler

FROM scratch
FROM gcr.io/distroless/static

# https://github.com/GoogleContainerTools/distroless/blob/16dc4a6a33838006fe956e4c19f049ece9c18a8d/common/variables.bzl#L18
USER 65532:65532

COPY --from=builder /app/eno-reconciler /eno-reconciler
ENTRYPOINT ["/eno-reconciler"]

0 comments on commit 4428ef4

Please sign in to comment.