FROM rust:buster as builder

COPY . /app
WORKDIR /app

RUN cargo build --release

FROM archlinux

RUN pacman -Syu --noconfirm
RUN pacman -S --noconfirm gnupg ca-certificates openssl-1.1

COPY --from=builder /app/target/release/me-site /me-site
COPY ./rocket.toml /rocket.toml

WORKDIR /

CMD ["/me-site"]