add deps & create dockerfile
This commit is contained in:
parent
119ea85a66
commit
440a660e05
@ -6,3 +6,4 @@ edition = "2021"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
sqlx = { version = "0.6.2", features = ["postgres"] }
|
||||||
|
|||||||
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM rust:latest as build
|
||||||
|
|
||||||
|
WORKDIR /usr/src/school_app_api
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN cargo install --path .
|
||||||
|
|
||||||
|
FROM debian:buster-slim
|
||||||
|
RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*
|
||||||
|
COPY --from=builder /user/local/cargo/bin/school_app_api /usr/local/bin/school_app_api
|
||||||
|
CMD ["school_app_api"]
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user