25 lines
1.1 KiB
Docker
25 lines
1.1 KiB
Docker
# syntax=docker.io/docker/dockerfile:experimental@sha256:de85b2f3a3e8a2f7fe48e8e84a65f6fdd5cd5183afa6412fff9caa6871649c44
|
|
FROM docker.io/library/rust:1.49@sha256:a50165ea96983c21832578afb1c8c028674c965bc1ed43b607871b1f362e06a5
|
|
|
|
RUN apt-get update && apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang ncat
|
|
RUN rustup default nightly
|
|
RUN rustup component add rustfmt
|
|
|
|
WORKDIR /usr/src/solana
|
|
|
|
ADD solana /usr/src/solana
|
|
ADD proto /usr/src/proto
|
|
|
|
ENV EMITTER_ADDRESS="11111111111111111111111111111115"
|
|
|
|
RUN --mount=type=cache,target=/usr/local/cargo,from=rust,source=/usr/local/cargo \
|
|
--mount=type=cache,target=/root/.cache \
|
|
--mount=type=cache,target=target \
|
|
--mount=type=cache,target=bridge/target \
|
|
cargo install --version =1.7.0 solana-cli && \
|
|
cargo install --version =2.0.12 spl-token-cli && \
|
|
cargo build --manifest-path ./bridge/Cargo.toml --package client --release && \
|
|
cp /usr/local/cargo/bin/solana /usr/local/bin && \
|
|
cp /usr/local/cargo/bin/spl-token /usr/local/bin && \
|
|
cp bridge/target/release/client /usr/local/bin
|