Added Docker build files
parent
f69e489f28
commit
b49a01ab03
|
@ -0,0 +1,8 @@
|
|||
*
|
||||
|
||||
# Source code
|
||||
!src/
|
||||
|
||||
# Cargo files
|
||||
!Cargo.toml
|
||||
!Cargo.lock
|
|
@ -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"]
|
Loading…
Reference in New Issue