wormhole/solana/Dockerfile

28 lines
930 B
Docker
Raw Normal View History

# syntax=docker.io/docker/dockerfile:experimental@sha256:de85b2f3a3e8a2f7fe48e8e84a65f6fdd5cd5183afa6412fff9caa6871649c44
FROM rust:1.48@sha256:65e254fff15478af71d342706b1e73b26fd883f3432813c129665a97a74e2278
2020-08-20 09:56:26 -07:00
RUN apt-get update && apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang
RUN rustup component add rustfmt
2020-08-21 05:52:38 -07:00
WORKDIR /usr/src/bridge
2020-08-20 09:56:26 -07:00
COPY bpf-sdk-install.sh .
COPY do.sh .
RUN ./do.sh update
COPY bridge bridge
COPY agent agent
COPY cli cli
COPY Cargo.toml .
COPY Cargo.lock .
2020-08-20 09:56:26 -07:00
2020-08-21 05:52:38 -07:00
RUN --mount=type=cache,target=/usr/local,from=rust,source=/usr/local \
2020-08-20 09:56:26 -07:00
--mount=type=cache,target=/root/.cache \
--mount=type=cache,target=bridge/target \
2020-08-21 03:43:31 -07:00
--mount=type=cache,target=target \
2020-08-21 05:52:38 -07:00
--mount=type=cache,target=bin,from=rust,source=bin \
2020-08-20 09:56:26 -07:00
./do.sh build bridge && \
mkdir -p /opt/solana/deps && \
cp target/bpfel-unknown-unknown/release/spl_bridge_debug.so /opt/solana/deps/spl_bridge.so