baseauth/Dockerfile

31 lines
588 B
Docker

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"]