docker work

This commit is contained in:
EvilMuffinHa 2022-03-02 13:56:42 -05:00
parent 1375505011
commit 389c61e44e

View File

@ -1,10 +1,21 @@
FROM ubuntu 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 WORKDIR /app
COPY ./target/release/fastcloud /app/fastcloud COPY --from=builder /build/target/release/fastcloud /app/fastcloud
COPY ./templates /app/templates RUN mkdir /app/service
COPY ./templates/ /app/templates
RUN mkdir /app/templates/service ENV FASTCLOUD_DIR /app/service
ENV FASTCLOUD_DIR /app/templates/service
CMD [ "/app/fastcloud" ] CMD [ "/app/fastcloud" ]