FROM alpine:latest AS builder
WORKDIR /app
COPY . .
RUN apk add --no-cache cargo
RUN cargo build --release --locked
FROM alpine:latest
COPY --from=builder /app/target/release/bootstrap-sona /usr/bin/bootstrap-sona
WORKDIR /config
COPY --from=builder /app/Rocket.toml /config/Rocket.toml
CMD ["bootstrap-sona"]