From d52d052de0b0e00b9bc8986b374510315689ed4d Mon Sep 17 00:00:00 2001 From: Pavel Nikolov Date: Thu, 25 Jul 2024 17:26:37 +0300 Subject: [PATCH] Use non-root user --- client.Dockerfile | 1 + server.Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/client.Dockerfile b/client.Dockerfile index e4c504e..44a0292 100644 --- a/client.Dockerfile +++ b/client.Dockerfile @@ -8,4 +8,5 @@ RUN cargo build --release --bin zkpauth-client # use distroless image instead of alpine because rust uses musl libc FROM gcr.io/distroless/cc-debian12 COPY --from=builder /app/target/release/zkpauth-client /app/ +USER 1000 CMD ["/app/zkpauth-client"] \ No newline at end of file diff --git a/server.Dockerfile b/server.Dockerfile index 148e93b..2e7a2c9 100644 --- a/server.Dockerfile +++ b/server.Dockerfile @@ -8,4 +8,5 @@ RUN cargo build --release --bin zkpauth-server # use distroless image instead of alpine because rust uses musl libc FROM gcr.io/distroless/cc-debian12 COPY --from=builder /app/target/release/zkpauth-server /app/ +USER 1000 CMD ["/app/zkpauth-server"]