2020-11-28 11:24:56 -08:00
|
|
|
# syntax=docker.io/docker/dockerfile:experimental@sha256:de85b2f3a3e8a2f7fe48e8e84a65f6fdd5cd5183afa6412fff9caa6871649c44
|
2021-02-12 04:48:44 -08:00
|
|
|
FROM docker.io/library/rust:1.49@sha256:a50165ea96983c21832578afb1c8c028674c965bc1ed43b607871b1f362e06a5
|
2020-08-15 13:14:24 -07:00
|
|
|
|
2020-11-27 16:33:57 -08:00
|
|
|
RUN apt-get update && apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang ncat
|
2021-06-22 11:09:38 -07:00
|
|
|
RUN rustup default nightly
|
2020-08-15 13:14:24 -07:00
|
|
|
RUN rustup component add rustfmt
|
|
|
|
|
|
|
|
WORKDIR /usr/src/solana
|
|
|
|
|
|
|
|
ADD solana /usr/src/solana
|
|
|
|
ADD proto /usr/src/proto
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/usr/local/cargo,from=rust,source=/usr/local/cargo \
|
2021-06-23 06:38:59 -07:00
|
|
|
--mount=type=cache,target=/root/.cache \
|
2020-08-15 13:14:24 -07:00
|
|
|
--mount=type=cache,target=target \
|
2021-06-23 06:38:59 -07:00
|
|
|
--mount=type=cache,target=bridge/target \
|
|
|
|
cargo install --version =1.7.0 solana-cli && \
|
|
|
|
cargo install --version =2.0.12 spl-token-cli && \
|
2021-06-22 11:09:38 -07:00
|
|
|
cargo build --manifest-path ./bridge/Cargo.toml --package client --release && \
|
2021-06-23 06:38:59 -07:00
|
|
|
cp /usr/local/cargo/bin/solana /usr/local/bin && \
|
|
|
|
cp /usr/local/cargo/bin/spl-token /usr/local/bin && \
|
2021-06-22 11:09:38 -07:00
|
|
|
cp bridge/target/release/client /usr/local/bin
|