forked from jito-foundation/geyser-grpc-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (35 loc) · 1.14 KB
/
Dockerfile
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
41
FROM rust:1.63.0
# Add Google Protocol Buffers for Libra's metrics library.
ENV PROTOC_VERSION 3.8.0
ENV PROTOC_ZIP protoc-$PROTOC_VERSION-linux-x86_64.zip
RUN set -x \
&& apt update \
&& apt install -y \
clang \
cmake \
libudev-dev \
make \
unzip \
libssl-dev \
pkg-config \
zlib1g-dev \
make \
&& rustup component add rustfmt \
&& rustup component add clippy \
&& rustc --version \
&& cargo --version \
&& curl -OL https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP \
&& unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
&& unzip -o $PROTOC_ZIP -d /usr/local include/* \
&& rm -f $PROTOC_ZIP
WORKDIR /geyser-grpc-plugin
COPY . .
RUN mkdir -p docker-output
ARG ci_commit
ENV CI_COMMIT=$ci_commit
# Uses docker buildkit to cache the image.
# /usr/local/cargo/git needed for crossbeam patch
RUN --mount=type=cache,mode=0777,target=/geyser-grpc-plugin/target \
--mount=type=cache,mode=0777,target=/usr/local/cargo/registry \
--mount=type=cache,mode=0777,target=/usr/local/cargo/git \
cargo build --release && cp target/release/libgeyser* ./docker-output