Newer
Older
FROM ekidd/rust-musl-builder:nightly-2021-01-01 AS builder
WORKDIR /home/rust/src
RUN USER=root cargo new --bin revolt
COPY src/bin/dummy.rs ./src/bin/dummy.rs
RUN cargo build --release --bin dummy
COPY assets/templates ./assets/templates
COPY src ./src
RUN cargo build --release
# Bundle Stage
FROM alpine:latest
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
COPY --from=builder /home/rust/src/revolt/target/x86_64-unknown-linux-musl/release/revolt ./
ENV ROCKET_ADDRESS 0.0.0.0
ENV ROCKET_PORT 8000