feat: dockerized project
This commit is contained in:
parent
eeed35e0b5
commit
5c564adafb
|
@ -0,0 +1,3 @@
|
|||
target
|
||||
doc
|
||||
db.sqlite
|
|
@ -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"]
|
Loading…
Reference in New Issue