FROM rust:latest AS cargo
COPY ./ /ringspace
WORKDIR /ringspace
RUN cargo build --release

FROM debian:latest
RUN apt update && apt install -y bash
RUN mkdir /app
WORKDIR /app
COPY --from=cargo /ringspace/target/release/ringspace /bin/ringspace
COPY ./entrypoint.sh /
COPY ./static ./static
COPY ./templates ./templates
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]
