Added Dockerfile and tests.
Signed-off-by: Pavel Kirilin <win10@list.ru>
This commit is contained in:
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
FROM rust:1.67.1-alpine3.17 as builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY src ./src
|
||||
RUN cargo build --release --all-features
|
||||
|
||||
FROM debian:bullseye-20230109-slim as base
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y openssl ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY static ./static
|
||||
|
||||
COPY --from=builder /app/target/release/s3bot /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/s3bot"]
|
||||
|
||||
FROM base as rootless
|
||||
|
||||
RUN useradd --create-home -u 1000 --user-group s3bot
|
||||
WORKDIR /home/s3bot
|
||||
USER s3bot
|
Reference in New Issue
Block a user