Compare commits

...

1 Commits

Author SHA1 Message Date
antifallobst 5c564adafb
feat: dockerized project 2023-10-07 10:53:48 +02:00
2 changed files with 33 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
target
doc
db.sqlite

30
Dockerfile Normal file
View File

@ -0,0 +1,30 @@
FROM rust:latest as build
RUN apt-get update; \
apt-get install -y libclang-dev automake autoconf
RUN USER=root cargo new --bin baseauth
WORKDIR /baseauth
COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml
RUN cargo build --release
RUN rm src/*.rs
COPY ./src ./src
RUN rm ./target/release/deps/baseauth*
RUN cargo build --release
FROM debian:bookworm-slim
COPY --from=build /baseauth/target/release/baseauth /bin/baseauth
RUN apt-get update; \
apt-get install -y libsqlite3-dev
RUN mkdir /data
VOLUME /data
CMD ["/bin/baseauth", "-w", "/data", "-D", "8080"]