forked from tonyke-bot/cached-eth-rpc
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 793 Bytes
/
Dockerfile
File metadata and controls
33 lines (23 loc) · 793 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
FROM lukemathwalker/cargo-chef:latest-rust-1-slim-buster AS chef
WORKDIR /app/
RUN apt update && apt install -y libssl-dev pkg-config
FROM chef AS planner
COPY src ./src
COPY Cargo.toml .
COPY Cargo.lock .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY src ./src
COPY Cargo.toml .
COPY Cargo.lock .
RUN cargo build --release
FROM debian:buster-slim
RUN apt update \
&& apt install -y openssl ca-certificates
RUN update-ca-certificates
COPY --from=builder /app/target/release/cached-eth-rpc /app/cached-eth-rpc
ENV ENDPOINTS="eth-chain=https://rpc.ankr.com/eth,bsc-chain=https://rpc.ankr.com/bsc"
EXPOSE 8124
ENTRYPOINT [ "/app/cached-eth-rpc" ]