forked from wormhole-foundation/wormhole
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.client
36 lines (28 loc) · 1.6 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
#syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
FROM ghcr.io/certusone/solana:1.10.31@sha256:d31e8db926a1d3fbaa9d9211d9979023692614b7b64912651aba0383e8c01bad AS solana
# libudev is needed by spl-token-cli, and ncat is needed by the devnet setup
# script to be able to signal a health status for tilt
RUN apt-get update && apt-get install -yq libudev-dev ncat
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
RUN --mount=type=cache,target=/root/.cache \
cargo install --version =2.0.12 --locked spl-token-cli
WORKDIR /usr/src/clients/js
COPY clients/js/package.json clients/js/package-lock.json ./
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm ci
COPY clients/js ./
COPY solana /usr/src/solana
COPY 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=target \
--mount=type=cache,target=/usr/local/cargo/registry,id=cargo_registry \
set -xe && \
cargo build --manifest-path ./Cargo.toml --package bridge_client --release --locked && \
cargo build --manifest-path ./Cargo.toml --package token_bridge_client --release --locked && \
cp target/release/bridge_client /usr/local/bin/client && \
cp target/release/token_bridge_client /usr/local/bin/token-bridge-client