-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.lit-api-server
More file actions
34 lines (25 loc) · 987 Bytes
/
Dockerfile.lit-api-server
File metadata and controls
34 lines (25 loc) · 987 Bytes
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
FROM rust:1-bookworm AS builder
WORKDIR /build
RUN apt-get update && apt-get install -y \
git \
pkg-config \
libssl-dev \
clang \
protobuf-compiler \
&& rm -rf /var/lib/apt/lists/*
COPY . .
RUN cd lit-api-server && cargo build --release --features production --bin lit-api-server
FROM debian:bookworm-slim AS runtime
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /build/lit-api-server/target/release/lit-api-server /usr/local/bin/
COPY --from=builder /build/lit-api-server/Rocket.toml /app/
COPY --from=builder /build/lit-api-server/rpc-config.yaml /app/
COPY --from=builder /build/lit-api-server/log_levels.toml /app/
# NodeConfig.toml required at startup (main branch uses NodeConfig.main.toml; default: next)
ARG NODE_CONFIG=NodeConfig.next.toml
COPY --from=builder /build/lit-api-server/${NODE_CONFIG} /app/NodeConfig.toml
CMD ["lit-api-server"]