We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 773ec7b commit 9643c4bCopy full SHA for 9643c4b
Dockerfile
@@ -1,5 +1,5 @@
1
# Stage 1: Build the application
2
-FROM rust:latest as builder
+FROM rust:bookworm as builder
3
4
WORKDIR /usr/src/app
5
@@ -14,7 +14,11 @@ RUN cargo build --release
14
15
16
# Stage 2: Create a lightweight production image
17
-FROM alpine:latest
+FROM debian:bookworm-slim
18
+
19
+RUN apt-get update && apt-get upgrade -y && apt-get install -y openssl
20
21
+RUN adduser --system --group rcp
22
23
24
@@ -27,5 +31,8 @@ ENV LOGGING_ENABLED true
27
31
# Expose the desired port
28
32
EXPOSE 8080
29
33
34
+# Change the user to the non-root user
35
+USER rcp
36
30
37
# Start the application
-CMD ["./rcp"]
38
+CMD ["./rcp"]
0 commit comments