36 lines
1.6 KiB
Docker
36 lines
1.6 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 -yq libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang ncat
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
|
|
RUN rustup default nightly
|
|
RUN rustup component add rustfmt
|
|
|
|
ADD clients/token_bridge /usr/src/clients/token_bridge
|
|
ADD ethereum /usr/src/ethereum
|
|
|
|
WORKDIR /usr/src/clients/token_bridge
|
|
RUN npm install
|
|
RUN npm run build-contracts
|
|
RUN npm run build
|
|
|
|
ADD solana /usr/src/solana
|
|
ADD proto /usr/src/proto
|
|
|
|
WORKDIR /usr/src/solana
|
|
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 \
|
|
--mount=type=cache,target=modules/token_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 && \
|
|
cargo build --manifest-path ./modules/token_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 && \
|
|
cp modules/token_bridge/target/release/client /usr/local/bin/token-bridge-client
|