-1
crates/ott-embed/src/main.rs
-1
crates/ott-embed/src/main.rs
-28
docker/postgres/migration.Dockerfile
-28
docker/postgres/migration.Dockerfile
···
1
-
FROM rust:1 AS chef
2
-
# We only pay the installation cost once,
3
-
# it will be cached from the second build onwards
4
-
RUN cargo install cargo-chef
5
-
WORKDIR /workspace
6
-
7
-
8
-
FROM chef AS planner
9
-
COPY crates .
10
-
RUN cargo chef prepare --recipe-path recipe.json
11
-
12
-
FROM chef AS builder
13
-
ARG CRATE_NAME
14
-
COPY --from=planner /workspace/recipe.json recipe.json
15
-
# Build dependencies - this is the caching Docker layer!
16
-
RUN cargo chef cook --release --recipe-path recipe.json
17
-
# Build application
18
-
COPY crates .
19
-
RUN cargo build --release --bin ${CRATE_NAME}
20
-
21
-
# We do not need the Rust toolchain to run the binary!
22
-
FROM debian:trixie-slim AS runtime
23
-
ARG CRATE_NAME
24
-
COPY ./connectors/fluvio_profile.toml /home/${CRATE_NAME}/.fluvio/config
25
-
COPY --from=builder /workspace/target/release/${CRATE_NAME} /usr/local/bin/app
26
-
ENTRYPOINT ["/usr/local/bin/app"]
27
-
28
-
29
1
FROM rust:1 AS chef
30
2
# We only pay the installation cost once,
31
3
# it will be cached from the second build onwards