|
1 | 1 | # Development Dockerfile - builds ALL binaries for local dev with Tilt |
2 | 2 | # For production, use per-crate Dockerfiles (e.g., bulk-trade-pusher/Dockerfile) |
3 | 3 | # |
4 | | -# Build context should be apps/pyth-lazer-pusher/ |
| 4 | +# Build context should be the repo root |
5 | 5 |
|
6 | 6 | FROM rust:1.88 AS builder |
7 | 7 |
|
8 | 8 | WORKDIR /src |
9 | 9 |
|
10 | | -# Copy source |
11 | | -COPY pusher-utils pusher-utils |
12 | | -COPY pusher-base pusher-base |
13 | | -COPY websocket-delivery websocket-delivery |
14 | | -COPY bulk-trade-pusher bulk-trade-pusher |
15 | | -COPY mock mock |
16 | | -COPY bulk-trade-cli bulk-trade-cli |
17 | | - |
18 | | -# Create workspace Cargo.toml on the fly (no Cargo.lock in context) |
19 | | -RUN printf '[workspace]\nresolver = "2"\nmembers = ["pusher-utils", "pusher-base", "websocket-delivery", "bulk-trade-pusher", "bulk-trade-cli", "mock/bulk-trade-mock-validator"]\n\n[workspace.lints.rust]\nunsafe_code = "deny"\n\n[workspace.lints.clippy]\nunwrap_used = "warn"\nexpect_used = "warn"\npanic = "warn"\nindexing_slicing = "warn"\n' > Cargo.toml |
| 10 | +# `cargo build --locked` refuses to rewrite Cargo.lock, and cargo prunes entries |
| 11 | +# for absent workspace members, so every member listed in the root Cargo.toml has |
| 12 | +# to be in the context even though only the lazer pusher crates are built. |
| 13 | +COPY Cargo.toml Cargo.lock ./ |
| 14 | +COPY apps/argus apps/argus |
| 15 | +COPY apps/fortuna apps/fortuna |
| 16 | +COPY apps/hermes/client/rust apps/hermes/client/rust |
| 17 | +COPY apps/pyth-lazer-pusher apps/pyth-lazer-pusher |
| 18 | +COPY apps/quorum apps/quorum |
| 19 | +COPY lazer/contracts/cardano/cli/rust lazer/contracts/cardano/cli/rust |
| 20 | +COPY pythnet/pythnet_sdk pythnet/pythnet_sdk |
| 21 | +COPY target_chains/starknet/tools/test_vaas target_chains/starknet/tools/test_vaas |
20 | 22 |
|
21 | 23 | # Build all binaries |
22 | 24 | RUN --mount=type=cache,target=/usr/local/cargo/registry \ |
23 | 25 | --mount=type=cache,target=/src/target \ |
24 | | - cargo build && \ |
| 26 | + cargo build --locked -p bulk-pusher -p bulk-trade-mock-validator -p bulk-trade-cli && \ |
25 | 27 | cp target/debug/bulk-pusher /bulk-pusher && \ |
26 | 28 | cp target/debug/bulk-trade-mock-validator /bulk-trade-mock-validator && \ |
27 | 29 | cp target/debug/bulk-trade-cli /bulk-trade-cli |
|
0 commit comments