2023-01-13 11:31:30 -08:00
|
|
|
# syntax = docker/dockerfile:1.2
|
2024-02-06 09:34:44 -08:00
|
|
|
FROM rust:1.73.0 as base
|
2024-02-12 04:41:03 -08:00
|
|
|
RUN cargo install cargo-chef@0.1.62 --locked
|
2023-01-13 11:31:30 -08:00
|
|
|
RUN rustup component add rustfmt
|
2024-02-06 12:37:34 -08:00
|
|
|
RUN apt-get update && apt-get install -y clang cmake ssh
|
2023-01-13 11:31:30 -08:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
FROM base AS plan
|
|
|
|
COPY . .
|
|
|
|
WORKDIR /app
|
|
|
|
RUN cargo chef prepare --recipe-path recipe.json
|
|
|
|
|
|
|
|
FROM base as build
|
|
|
|
COPY --from=plan /app/recipe.json recipe.json
|
|
|
|
RUN cargo chef cook --release --recipe-path recipe.json
|
|
|
|
COPY . .
|
2023-09-08 06:13:20 -07:00
|
|
|
RUN cargo build --release --bin lite-rpc --bin solana-lite-rpc-quic-forward-proxy
|
2023-01-13 11:31:30 -08:00
|
|
|
|
2024-02-06 12:44:46 -08:00
|
|
|
FROM debian:bookworm-slim as run
|
2024-02-06 12:37:34 -08:00
|
|
|
RUN apt-get update && apt-get -y install ca-certificates libc6 libssl3 libssl-dev openssl
|
2023-09-08 06:13:20 -07:00
|
|
|
COPY --from=build /app/target/release/solana-lite-rpc-quic-forward-proxy /usr/local/bin/
|
2023-01-13 11:31:30 -08:00
|
|
|
COPY --from=build /app/target/release/lite-rpc /usr/local/bin/
|
2023-09-09 08:55:37 -07:00
|
|
|
|
2023-11-27 07:38:50 -08:00
|
|
|
CMD lite-rpc
|