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
|
|
|
|
|
|
|
|
WORKDIR /usr/src/solana
|
|
|
|
|
|
|
|
COPY bpf-sdk-install.sh .
|
|
|
|
COPY do.sh .
|
|
|
|
|
|
|
|
RUN ./do.sh update
|
|
|
|
|
|
|
|
COPY bridge bridge
|
2020-08-20 11:12:44 -07:00
|
|
|
COPY agent agent
|
|
|
|
COPY cli cli
|
|
|
|
COPY Cargo.toml .
|
|
|
|
COPY Cargo.lock .
|
2020-08-20 09:56:26 -07:00
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/usr/local/cargo,from=rust,source=/usr/local/cargo \
|
|
|
|
--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-20 09:56:26 -07:00
|
|
|
./do.sh build bridge && \
|
|
|
|
mkdir -p /opt/solana/deps && \
|
2020-08-20 11:12:44 -07:00
|
|
|
cp target/bpfel-unknown-unknown/release/spl_bridge.so /opt/solana/deps
|