pyth-crosschain/third_party/pyth/Dockerfile.p2w-attest

32 lines
1.4 KiB
Docker
Raw Normal View History

#syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
FROM ghcr.io/certusone/solana:1.10.31@sha256:d31e8db926a1d3fbaa9d9211d9979023692614b7b64912651aba0383e8c01bad AS solana
RUN apt-get update && apt-get install -yq python3 libudev-dev ncat
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
ADD governance/remote_executor /usr/src/governance/remote_executor
ADD wormhole_attester /usr/src/wormhole_attester
WORKDIR /usr/src/wormhole_attester
ENV EMITTER_ADDRESS="11111111111111111111111111111115"
ENV BRIDGE_ADDRESS="Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=target \
Repo structure refactor (#449) * Repo structure refactor This change introduces major codebase layout changes in three areas: * Tilt devnet lives in tilt-devnet/ - all k8s and docker files, scripts, local testing private keys are moved to this directory. * pyth2wormhole becomes pyth-wormhole-attester and is relocated to wormhole-attester/ - This long-needed rename will hopefully eradicate most of the confusing naming around the attester. The Rust client binary becomes pyth-wormhole-attester-client. * Target-chain code lives in target-chain/ - This leaves just the attester, third_party and pythnet-specific things at top-level. Other opportunistic changes: * Fixed rebuild trigger for Dockerfile.wasm These items are a fraction of the necessary structure changes in the repo. * cosmwasm: fix contract after faulty merge * .github: remove unused dependabot config * Fix path references in .github and .pre-commit-config.yml * .github: Rename attester references to pyth-wormhole-attester * .pre-commit-config.yaml: fix paths and run all commit hooks * p2w-relay: Fix faulty merge resolution in favor of origin/main * Dockerfile.pyth_relay: Fix Ethereum path reference * Dockerfile.solana: Trip early cache with arbitrary change * Dockerfile.pyth_relay: typo * p2w-relay: fix evm build in npm script * Dockerfile.solana: Retry invalidating cache again * near -> target-chains/near * wormhole-attester: bump on/off-chain major versions due to rename Attester packages were renamed. This possibly breaks most dependees. * Dockerfile.solana: Improve decoy-crate to have a real lib target * .github/[...]/pyth-cosmwasm-contract.yml: typo * rust-toolchain: Bump rust to stable 1.63 * rust-toolchain: use christmas nightly * empty commit to trigger build * attester-image-push.yaml: keep xc-attest image name intact * multisig-wh-message-builder: remove accidental revert
2023-01-04 05:46:42 -08:00
cargo test --package pyth-wormhole-attester-client && \
cargo build --package pyth-wormhole-attester-client && \
mv target/debug/pwhac /usr/local/bin/pwhac
ADD third_party/pyth/pyth_utils.py /usr/src/pyth/pyth_utils.py
ADD third_party/pyth/p2w_autoattest.py /usr/src/pyth/p2w_autoattest.py
ADD tilt_devnet/secrets/solana /solana-secrets
Repo structure refactor (#449) * Repo structure refactor This change introduces major codebase layout changes in three areas: * Tilt devnet lives in tilt-devnet/ - all k8s and docker files, scripts, local testing private keys are moved to this directory. * pyth2wormhole becomes pyth-wormhole-attester and is relocated to wormhole-attester/ - This long-needed rename will hopefully eradicate most of the confusing naming around the attester. The Rust client binary becomes pyth-wormhole-attester-client. * Target-chain code lives in target-chain/ - This leaves just the attester, third_party and pythnet-specific things at top-level. Other opportunistic changes: * Fixed rebuild trigger for Dockerfile.wasm These items are a fraction of the necessary structure changes in the repo. * cosmwasm: fix contract after faulty merge * .github: remove unused dependabot config * Fix path references in .github and .pre-commit-config.yml * .github: Rename attester references to pyth-wormhole-attester * .pre-commit-config.yaml: fix paths and run all commit hooks * p2w-relay: Fix faulty merge resolution in favor of origin/main * Dockerfile.pyth_relay: Fix Ethereum path reference * Dockerfile.solana: Trip early cache with arbitrary change * Dockerfile.pyth_relay: typo * p2w-relay: fix evm build in npm script * Dockerfile.solana: Retry invalidating cache again * near -> target-chains/near * wormhole-attester: bump on/off-chain major versions due to rename Attester packages were renamed. This possibly breaks most dependees. * Dockerfile.solana: Improve decoy-crate to have a real lib target * .github/[...]/pyth-cosmwasm-contract.yml: typo * rust-toolchain: Bump rust to stable 1.63 * rust-toolchain: use christmas nightly * empty commit to trigger build * attester-image-push.yaml: keep xc-attest image name intact * multisig-wh-message-builder: remove accidental revert
2023-01-04 05:46:42 -08:00
RUN chmod a+rx /usr/src/pyth/*.py
Repo structure refactor (#449) * Repo structure refactor This change introduces major codebase layout changes in three areas: * Tilt devnet lives in tilt-devnet/ - all k8s and docker files, scripts, local testing private keys are moved to this directory. * pyth2wormhole becomes pyth-wormhole-attester and is relocated to wormhole-attester/ - This long-needed rename will hopefully eradicate most of the confusing naming around the attester. The Rust client binary becomes pyth-wormhole-attester-client. * Target-chain code lives in target-chain/ - This leaves just the attester, third_party and pythnet-specific things at top-level. Other opportunistic changes: * Fixed rebuild trigger for Dockerfile.wasm These items are a fraction of the necessary structure changes in the repo. * cosmwasm: fix contract after faulty merge * .github: remove unused dependabot config * Fix path references in .github and .pre-commit-config.yml * .github: Rename attester references to pyth-wormhole-attester * .pre-commit-config.yaml: fix paths and run all commit hooks * p2w-relay: Fix faulty merge resolution in favor of origin/main * Dockerfile.pyth_relay: Fix Ethereum path reference * Dockerfile.solana: Trip early cache with arbitrary change * Dockerfile.pyth_relay: typo * p2w-relay: fix evm build in npm script * Dockerfile.solana: Retry invalidating cache again * near -> target-chains/near * wormhole-attester: bump on/off-chain major versions due to rename Attester packages were renamed. This possibly breaks most dependees. * Dockerfile.solana: Improve decoy-crate to have a real lib target * .github/[...]/pyth-cosmwasm-contract.yml: typo * rust-toolchain: Bump rust to stable 1.63 * rust-toolchain: use christmas nightly * empty commit to trigger build * attester-image-push.yaml: keep xc-attest image name intact * multisig-wh-message-builder: remove accidental revert
2023-01-04 05:46:42 -08:00
ENV P2W_OWNER_KEYPAIR="/solana-secrets/p2w_owner.json"
ENV P2W_ATTESTATIONS_PORT="4343"
Repo structure refactor (#449) * Repo structure refactor This change introduces major codebase layout changes in three areas: * Tilt devnet lives in tilt-devnet/ - all k8s and docker files, scripts, local testing private keys are moved to this directory. * pyth2wormhole becomes pyth-wormhole-attester and is relocated to wormhole-attester/ - This long-needed rename will hopefully eradicate most of the confusing naming around the attester. The Rust client binary becomes pyth-wormhole-attester-client. * Target-chain code lives in target-chain/ - This leaves just the attester, third_party and pythnet-specific things at top-level. Other opportunistic changes: * Fixed rebuild trigger for Dockerfile.wasm These items are a fraction of the necessary structure changes in the repo. * cosmwasm: fix contract after faulty merge * .github: remove unused dependabot config * Fix path references in .github and .pre-commit-config.yml * .github: Rename attester references to pyth-wormhole-attester * .pre-commit-config.yaml: fix paths and run all commit hooks * p2w-relay: Fix faulty merge resolution in favor of origin/main * Dockerfile.pyth_relay: Fix Ethereum path reference * Dockerfile.solana: Trip early cache with arbitrary change * Dockerfile.pyth_relay: typo * p2w-relay: fix evm build in npm script * Dockerfile.solana: Retry invalidating cache again * near -> target-chains/near * wormhole-attester: bump on/off-chain major versions due to rename Attester packages were renamed. This possibly breaks most dependees. * Dockerfile.solana: Improve decoy-crate to have a real lib target * .github/[...]/pyth-cosmwasm-contract.yml: typo * rust-toolchain: Bump rust to stable 1.63 * rust-toolchain: use christmas nightly * empty commit to trigger build * attester-image-push.yaml: keep xc-attest image name intact * multisig-wh-message-builder: remove accidental revert
2023-01-04 05:46:42 -08:00
ENV PYTH_PUBLISHER_KEYPAIR="/solana-secrets/pyth_publisher.json"
ENV PYTH_PROGRAM_KEYPAIR="/solana-secrets/pyth_program.json"