From 440a660e05d7cb6d0de6039bf19ee03438e3a227 Mon Sep 17 00:00:00 2001 From: Mitchell Marino Date: Wed, 11 Jan 2023 20:00:02 -0600 Subject: [PATCH] add deps & create dockerfile --- Cargo.toml | 1 + Dockerfile | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 Dockerfile diff --git a/Cargo.toml b/Cargo.toml index 24bb5b3..6a57def 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,3 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +sqlx = { version = "0.6.2", features = ["postgres"] } diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..60147e4 --- /dev/null +++ b/Dockerfile @@ -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"] +