Dockerfile 533 B

123456789101112131415
  1. # We use the latest Rust stable release as base image
  2. FROM rust:1.53.0
  3. # Let's switch our working directory to `app` (equivalent to `cd app`)
  4. # The `app` folder will be created for us by Docker in case it does not
  5. # exist already.
  6. WORKDIR /app
  7. # Copy all files from our working environment to our Docker image
  8. COPY . .
  9. # Let's build our binary!
  10. # We'll use the release profile to make it fast
  11. WORKDIR /app/backend
  12. RUN cargo build --release
  13. # When `docker run` is executed, launch the binary!
  14. ENTRYPOINT ["./target/release/backend"]