Skip to content

Commit e740d4c

Browse files
authored
build: use public locked dependencies in Docker images (#745)
1 parent 44653cc commit e740d4c

2 files changed

Lines changed: 8 additions & 37 deletions

File tree

‎control_plane/Dockerfile‎

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
# Builds the control_plane (controller) binary → asap/control-plane:dev.
22
#
3-
# Companion to data_plane/Dockerfile (same repo-ownership + build-context
4-
# rationale — see that file's header). Splitting the controller into its own
5-
# image (it used to ship inside the combined asap/query-backend:dev) is part of
6-
# the 2026-05 reorg: each crate owns its image, named after the crate.
3+
# Build from the backend checkout; Cargo fetches public Git dependencies
4+
# at the revisions recorded in Cargo.lock.
75
#
8-
# Even though the controller doesn't compile asap-precompute-rs/asap-gorilla-rust
9-
# directly, the workspace manifest must still resolve every member's path-deps
10-
# (data_plane path-deps those siblings), so the same build-contexts are supplied.
11-
#
12-
# DOCKER_BUILDKIT=1 docker build -f control_plane/Dockerfile \
13-
# --build-context asap-precompute-rs=/path/ASAPCollector/asap-precompute-rs \
14-
# --build-context asap-sketchlib=/path/asap_sketchlib \
15-
# --build-context asap-gorilla-rust=/path/ASAPCollector/asap-gorilla-rust \
16-
# -t asap/control-plane:dev .
6+
# docker build -f control_plane/Dockerfile -t asap/control-plane:dev .
177
FROM rust:1.90-bookworm AS build
188
WORKDIR /src
199

@@ -24,14 +14,9 @@ RUN apt-get update && \
2414
protobuf-compiler git ca-certificates && \
2515
rm -rf /var/lib/apt/lists/*
2616

27-
# Same sibling-checkout layout as data_plane/Dockerfile so workspace path-deps
28-
# resolve during the build.
2917
COPY . ASAPQuery-backend
30-
COPY --from=asap-precompute-rs . ASAPCollector/asap-precompute-rs
31-
COPY --from=asap-sketchlib . asap_sketchlib
32-
COPY --from=asap-gorilla-rust . ASAPCollector/asap-gorilla-rust
3318

34-
RUN cd ASAPQuery-backend && cargo build --release --bin control_plane
19+
RUN cd ASAPQuery-backend && cargo build --locked --release --bin control_plane
3520

3621
# Runtime image: binary + CA certs.
3722
FROM debian:bookworm-slim

‎data_plane/Dockerfile‎

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,10 @@
66
# old cross-repo combined builder (ASAPCollector deploy/docker/Dockerfile.backend)
77
# is retired.
88
#
9-
# Cross-repo build-contexts: the data_plane crate path-deps `control_plane`
10-
# (in-repo, copied with the repo) and, transitively through asap-precompute-rs,
11-
# the sibling crates asap-precompute-rs / asap-gorilla-rust (in the ASAPCollector
12-
# repo) and asap_sketchlib (separate repo). They are supplied as BuildKit
13-
# build-contexts that recreate the canonical sibling layout under /src so the
14-
# `../../ASAPCollector/...` / `../../asap_sketchlib` path-deps resolve.
9+
# Build from the backend checkout; Cargo fetches public Git dependencies
10+
# at the revisions recorded in Cargo.lock.
1511
#
16-
# DOCKER_BUILDKIT=1 docker build -f data_plane/Dockerfile \
17-
# --build-context asap-precompute-rs=/path/ASAPCollector/asap-precompute-rs \
18-
# --build-context asap-sketchlib=/path/asap_sketchlib \
19-
# --build-context asap-gorilla-rust=/path/ASAPCollector/asap-gorilla-rust \
20-
# -t asap/data-plane:dev .
12+
# docker build -f data_plane/Dockerfile -t asap/data-plane:dev .
2113
FROM rust:1.90-bookworm AS build
2214
WORKDIR /src
2315

@@ -27,15 +19,9 @@ RUN apt-get update && \
2719
protobuf-compiler git ca-certificates && \
2820
rm -rf /var/lib/apt/lists/*
2921

30-
# Recreate the sibling-checkout layout the path-deps expect:
31-
# /src/ASAPQuery-backend, /src/ASAPCollector/asap-precompute-rs,
32-
# /src/asap_sketchlib, /src/ASAPCollector/asap-gorilla-rust
3322
COPY . ASAPQuery-backend
34-
COPY --from=asap-precompute-rs . ASAPCollector/asap-precompute-rs
35-
COPY --from=asap-sketchlib . asap_sketchlib
36-
COPY --from=asap-gorilla-rust . ASAPCollector/asap-gorilla-rust
3723

38-
RUN cd ASAPQuery-backend && cargo build --release --bin data_plane
24+
RUN cd ASAPQuery-backend && cargo build --locked --release --bin data_plane
3925

4026
# Runtime image: binary + CA certs.
4127
FROM debian:bookworm-slim

0 commit comments

Comments
 (0)