pyth-crosschain/solana/Dockerfile

28 lines
776 B
Docker
Raw Normal View History

2020-08-20 09:56:26 -07:00
# syntax=docker/dockerfile:experimental
FROM rust:1.45
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