Added Docker build files

This commit is contained in:
Jef Roosens 2021-03-05 20:40:49 +01:00
parent f69e489f28
commit b49a01ab03
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
3 changed files with 33 additions and 0 deletions

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
# syntax=docker/dockerfile:1.2
FROM rustlang/rust:nightly AS builder
WORKDIR /usr/src/app
# Build the app
COPY . .
RUN --mount=type=cache,target=/usr/src/app/target cargo install --path .
FROM debian:buster-slim
COPY --from=builder /usr/local/cargo/bin/rust-api /usr/local/bin/rust-api
CMD ["rust-api"]