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-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
|
|
|
|
2021-04-07 06:13:01 -07:00
|
|
|
RUN sh -c "$(curl -sSfL https://release.solana.com/v1.5.5/install)"
|
|
|
|
|
|
|
|
ENV PATH="/root/.local/share/solana/install/active_release/bin:$PATH"
|
|
|
|
|
2020-08-20 09:56:26 -07:00
|
|
|
COPY bpf-sdk-install.sh .
|
|
|
|
COPY do.sh .
|
|
|
|
|
|
|
|
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
|
|
|
|
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 && \
|
2021-04-07 06:13:01 -07:00
|
|
|
cp target/deploy/spl_bridge_debug.so /opt/solana/deps/spl_bridge.so
|