24 lines
421 B
Docker
24 lines
421 B
Docker
|
FROM rust:1.59 as builder
|
||
|
|
||
|
WORKDIR /build
|
||
|
|
||
|
COPY ./src/ /build/src
|
||
|
COPY ./Cargo.toml /build/Cargo.toml
|
||
|
|
||
|
RUN rustup update nightly && rustup default nightly && \
|
||
|
cargo clean && cargo build --release
|
||
|
|
||
|
FROM debian:buster-slim
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY --from=builder /build/target/release/fastcloud /app/fastcloud
|
||
|
|
||
|
RUN mkdir /app/service
|
||
|
|
||
|
COPY ./templates/ /app/templates
|
||
|
|
||
|
ENV FSERVE_DIR /app/service
|
||
|
|
||
|
CMD [ "/app/fastcloud" ]
|