FROM rust as builder

WORKDIR /build
COPY . .

RUN pwd
RUN ls

RUN cargo build --release
RUN pwd
RUN ls

FROM debian

WORKDIR /root
COPY --from=builder /build/target/release/database .
RUN ls -lh

ENV PORT=''
ENV STORAGE_DIR=''

CMD ["./database"]
