FROM rust:alpine as build RUN apk add --no-cache build-base RUN rustup default nightly && rustup update WORKDIR /app COPY . . RUN cargo build --release FROM scratch COPY --from=build /app/target/release/explain . ENV ROCKET_PORT=3000 EXPOSE ${ROCKET_PORT} ENTRYPOINT ["./explain"]