web/Dockerfile

16 lines
366 B
Text
Raw Normal View History

FROM rust
2023-10-16 01:35:05 +02:00
WORKDIR /usr/src/app
# first cargo files to cache dependencies
COPY Cargo.toml Cargo.lock ./
RUN mkdir src && \
echo "fn main() {println!(\"if you see this, the build broke\")}" > src/main.rs && \
cargo build --release
RUN rm -rf src target/release/deps/ixvd_web*
COPY . .
RUN cargo build --release
EXPOSE 8080
CMD ["./target/release/ixvd-web"]