2021-12-12 02:57:20 -08:00
|
|
|
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
|
2021-08-22 12:52:48 -07:00
|
|
|
FROM docker.io/library/rust:1.49@sha256:a50165ea96983c21832578afb1c8c028674c965bc1ed43b607871b1f362e06a5 AS build
|
2021-07-26 06:44:33 -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
|
2021-09-01 06:05:59 -07:00
|
|
|
RUN rustup default nightly-2021-08-01
|
2021-07-26 06:44:33 -07:00
|
|
|
|
|
|
|
WORKDIR /usr/src/bridge
|
|
|
|
|
2021-11-01 13:31:01 -07:00
|
|
|
RUN cargo install wasm-pack --vers 0.9.1
|
2021-07-26 06:44:33 -07:00
|
|
|
|
|
|
|
ENV RUST_LOG="solana_runtime::system_instruction_processor=trace,solana_runtime::message_processor=trace,solana_bpf_loader=debug,solana_rbpf=debug"
|
|
|
|
ENV EMITTER_ADDRESS="11111111111111111111111111111115"
|
2021-08-22 12:52:48 -07:00
|
|
|
ENV BRIDGE_ADDRESS="Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"
|
2021-07-26 06:44:33 -07:00
|
|
|
|
|
|
|
COPY bridge bridge
|
|
|
|
COPY modules modules
|
2021-08-22 12:52:48 -07:00
|
|
|
COPY solitaire solitaire
|
2021-09-09 13:09:01 -07:00
|
|
|
COPY migration migration
|
2021-09-14 06:40:05 -07:00
|
|
|
COPY pyth2wormhole pyth2wormhole
|
2021-08-22 12:52:48 -07:00
|
|
|
|
|
|
|
# Compile Wormhole
|
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=type=cache,target=bridge/target \
|
|
|
|
cd bridge/program && /usr/local/cargo/bin/wasm-pack build --target bundler -d bundler -- --features wasm
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=type=cache,target=bridge/target \
|
|
|
|
cd bridge/program && /usr/local/cargo/bin/wasm-pack build --target nodejs -d nodejs -- --features wasm
|
|
|
|
|
|
|
|
# Compile Token Bridge
|
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=type=cache,target=modules/token_bridge/target \
|
|
|
|
cd modules/token_bridge/program && /usr/local/cargo/bin/wasm-pack build --target bundler -d bundler -- --features wasm
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=type=cache,target=modules/token_bridge/target \
|
|
|
|
cd modules/token_bridge/program && /usr/local/cargo/bin/wasm-pack build --target nodejs -d nodejs -- --features wasm
|
|
|
|
|
2021-09-09 13:09:01 -07:00
|
|
|
# Compile Migration
|
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=type=cache,target=migration/target \
|
|
|
|
cd migration && /usr/local/cargo/bin/wasm-pack build --target bundler -d bundler -- --features wasm
|
|
|
|
|
2021-11-05 12:18:12 -07:00
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=type=cache,target=migration/target \
|
|
|
|
cd migration && /usr/local/cargo/bin/wasm-pack build --target nodejs -d nodejs -- --features wasm
|
|
|
|
|
2021-08-31 01:28:51 -07:00
|
|
|
# Compile NFT Bridge
|
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=type=cache,target=modules/nft_bridge/target \
|
|
|
|
cd modules/nft_bridge/program && /usr/local/cargo/bin/wasm-pack build --target bundler -d bundler -- --features wasm
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=type=cache,target=modules/nft_bridge/target \
|
|
|
|
cd modules/nft_bridge/program && /usr/local/cargo/bin/wasm-pack build --target nodejs -d nodejs -- --features wasm
|
|
|
|
|
2021-09-14 06:40:05 -07:00
|
|
|
# Compile pyth2wormhole
|
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=type=cache,target=pyth2wormhole/target \
|
|
|
|
cd pyth2wormhole/program \
|
|
|
|
&& /usr/local/cargo/bin/wasm-pack build --target bundler -d bundler -- --features wasm
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache \
|
|
|
|
--mount=type=cache,target=pyth2wormhole/target \
|
|
|
|
cd pyth2wormhole/program \
|
|
|
|
&& /usr/local/cargo/bin/wasm-pack build --target nodejs -d nodejs -- --features wasm
|
|
|
|
|
2021-08-22 12:52:48 -07:00
|
|
|
FROM scratch AS export
|
|
|
|
|
|
|
|
COPY --from=build /usr/src/bridge/bridge/program/bundler sdk/js/src/solana/core
|
|
|
|
COPY --from=build /usr/src/bridge/modules/token_bridge/program/bundler sdk/js/src/solana/token
|
2021-09-09 13:09:01 -07:00
|
|
|
COPY --from=build /usr/src/bridge/migration/bundler sdk/js/src/solana/migration
|
2021-08-31 01:28:51 -07:00
|
|
|
COPY --from=build /usr/src/bridge/modules/nft_bridge/program/bundler sdk/js/src/solana/nft
|
2021-09-14 06:40:05 -07:00
|
|
|
COPY --from=build /usr/src/bridge/pyth2wormhole/program/bundler third_party/pyth/p2w-sdk/src/solana/p2w-core
|
2021-10-05 08:43:54 -07:00
|
|
|
COPY --from=build /usr/src/bridge/bridge/program/bundler explorer/wasm/core
|
|
|
|
COPY --from=build /usr/src/bridge/modules/token_bridge/program/bundler explorer/wasm/token
|
|
|
|
COPY --from=build /usr/src/bridge/modules/nft_bridge/program/bundler explorer/wasm/nft
|
2021-10-28 04:48:43 -07:00
|
|
|
COPY --from=build /usr/src/bridge/bridge/program/bundler third_party/pyth/p2w-sdk/src/solana/wormhole-core
|
2021-08-22 12:52:48 -07:00
|
|
|
|
2021-11-05 12:18:12 -07:00
|
|
|
COPY --from=build /usr/src/bridge/bridge/program/nodejs sdk/js/src/solana/core-node
|
|
|
|
COPY --from=build /usr/src/bridge/modules/token_bridge/program/nodejs sdk/js/src/solana/token-node
|
|
|
|
COPY --from=build /usr/src/bridge/migration/nodejs sdk/js/src/solana/migration-node
|
|
|
|
COPY --from=build /usr/src/bridge/modules/nft_bridge/program/nodejs sdk/js/src/solana/nft-node
|
2021-08-22 12:52:48 -07:00
|
|
|
COPY --from=build /usr/src/bridge/bridge/program/nodejs clients/solana/pkg
|
|
|
|
COPY --from=build /usr/src/bridge/bridge/program/nodejs clients/token_bridge/pkg/core
|
2021-08-31 01:28:51 -07:00
|
|
|
COPY --from=build /usr/src/bridge/bridge/program/nodejs clients/nft_bridge/pkg/core
|
2021-08-22 12:52:48 -07:00
|
|
|
COPY --from=build /usr/src/bridge/modules/token_bridge/program/nodejs clients/token_bridge/pkg/token
|
2021-08-31 01:28:51 -07:00
|
|
|
COPY --from=build /usr/src/bridge/modules/nft_bridge/program/nodejs clients/nft_bridge/pkg/nft
|