forked from wormhole-foundation/wormhole
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.client
59 lines (47 loc) · 2.16 KB
/
Dockerfile.client
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
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 curl -sSfL https://release.solana.com/v1.7.8/install | sh
RUN rustup default nightly-2021-08-01
RUN rustup component add rustfmt
RUN --mount=type=cache,target=/root/.cache \
cargo install --version =2.0.12 spl-token-cli
ENV SOLANA_BIN_PATH="/root/.local/share/solana/install/active_release/bin"
ENV PATH="$SOLANA_BIN_PATH:$PATH"
ADD ethereum /usr/src/ethereum
WORKDIR /usr/src/ethereum
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/root/.npm \
npm ci
ADD clients/token_bridge /usr/src/clients/token_bridge
WORKDIR /usr/src/clients/token_bridge
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/root/.npm \
set -xe && \
npm ci && \
npm run build-contracts && \
npm run build
ADD clients/nft_bridge /usr/src/clients/nft_bridge
WORKDIR /usr/src/clients/nft_bridge
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/root/.npm \
set -xe && \
npm ci && \
npm run build-contracts && \
npm run build
ADD solana /usr/src/solana
ADD proto /usr/src/proto
WORKDIR /usr/src/solana
RUN solana config set --keypair "/usr/src/solana/keys/solana-devnet.json"
RUN solana config set --url "http://solana-devnet:8899"
ENV EMITTER_ADDRESS="11111111111111111111111111111115"
ENV BRIDGE_ADDRESS="Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=bridge/target \
--mount=type=cache,target=modules/token_bridge/target \
set -xe && \
cargo build --manifest-path ./bridge/Cargo.toml --package client --release && \
cargo build --manifest-path ./modules/token_bridge/Cargo.toml --package client --release && \
cp bridge/target/release/client /usr/local/bin && \
cp modules/token_bridge/target/release/client /usr/local/bin/token-bridge-client