-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathexample-service.Dockerfile
More file actions
40 lines (26 loc) · 1.16 KB
/
example-service.Dockerfile
File metadata and controls
40 lines (26 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright (c) 2024 Cloudflare, Inc. All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
FROM rust:1.84.1-bookworm AS builder
RUN apt update && \
apt install -y \
capnproto
WORKDIR /dap
COPY Cargo.toml Cargo.lock .
COPY crates/daphne crates/daphne
COPY crates/daphne-service-utils crates/daphne-service-utils
COPY crates/daphne-server crates/daphne-server
RUN cargo build -p daphne-server --example service --features test-utils
FROM debian:bookworm AS helper
COPY ./crates/daphne-server/examples/configuration-helper.toml configuration.toml
RUN sed -i 's/localhost/helper_storage/g' configuration.toml
COPY --from=builder /dap/target/debug/examples/service .
ENTRYPOINT ["./service"]
FROM debian:bookworm AS leader
COPY ./crates/daphne-server/examples/configuration-leader.toml configuration.toml
RUN sed -i 's/localhost/leader_storage/g' configuration.toml
COPY --from=builder /dap/target/debug/examples/service .
ENTRYPOINT ["./service"]
FROM debian:bookworm AS compute-offload
COPY ./crates/daphne-server/examples/configuration-cpu-offload.toml configuration.toml
COPY --from=builder /dap/target/debug/examples/service .
ENTRYPOINT ["./service"]