diff options
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c34bb83 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# Stage 1 +FROM rust:latest as builder + +WORKDIR /app +COPY . . +RUN cargo build --release + + +# Stage 2 +FROM debian:bookworm-slim + +RUN mkdir -p /app + +RUN groupadd -g 999 appuser && \ + useradd -r -u 999 -g appuser appuser + +USER appuser + +COPY --from=builder /app/target/release/cas /app + +WORKDIR /app + +EXPOSE 8000 + +ENTRYPOINT ["./cas"] |