We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f5639c commit df8aa88Copy full SHA for df8aa88
Dockerfile.dev
@@ -0,0 +1,25 @@
1
+FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
2
+
3
+RUN apt-get update && \
4
+ apt-get install -y build-essential
5
6
+WORKDIR /app
7
8
+FROM chef AS planner
9
+COPY . .
10
+RUN cargo chef prepare --recipe-path recipe.json
11
12
+FROM chef AS builder
13
+COPY --from=planner /app/recipe.json recipe.json
14
+# Build dependencies - this is the caching Docker layer!
15
+RUN cargo chef cook --release --recipe-path recipe.json
16
+# Build application
17
18
+RUN cargo build
19
20
+FROM debian:bookworm-slim
21
+COPY --from=builder /app/target/release/pgcat /usr/bin/pgcat
22
+COPY --from=builder /app/pgcat.toml /etc/pgcat/pgcat.toml
23
+WORKDIR /etc/pgcat
24
+ENV RUST_LOG=info
25
+CMD ["pgcat"]
0 commit comments