web/Dockerfile

16 lines
355 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
2023-10-16 01:36:02 +02:00
COPY Cargo.toml ./
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"]