Skip to content

Commit

Permalink
fix: switch to nonroot docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumedsde committed Nov 17, 2024
1 parent 9c54627 commit df062a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NOTE: use Google's "distroless with libgcc1" base image, see:
# https://github.com/GoogleContainerTools/distroless/blob/6755e21ccd99ddead6edc8106ba03888cbeed41a/cc/README.md
ARG BASE_IMAGE_FINAL_STAGES="gcr.io/distroless/cc:latest"
ARG BASE_IMAGE_FINAL_STAGES="gcr.io/distroless/cc:nonroot"

FROM rust:1-bookworm AS builder

Expand All @@ -10,10 +10,10 @@ RUN cargo install --path .

FROM ${BASE_IMAGE_FINAL_STAGES} AS send

COPY --from=builder /usr/local/cargo/bin/diode-send /usr/local/bin/
COPY --from=builder --chown=root:root --chmod=755 /usr/local/cargo/bin/diode-send /usr/local/bin/
ENTRYPOINT ["diode-send"]

FROM ${BASE_IMAGE_FINAL_STAGES} AS receive

COPY --from=builder /usr/local/cargo/bin/diode-receive /usr/local/bin/
COPY --from=builder --chown=root:root --chmod=755 /usr/local/cargo/bin/diode-receive /usr/local/bin/
ENTRYPOINT ["diode-receive"]

0 comments on commit df062a5

Please sign in to comment.