web/Dockerfile
2023-10-16 01:36:02 +02:00

16 lines
No EOL
355 B
Docker

FROM rust
WORKDIR /usr/src/app
# first cargo files to cache dependencies
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"]