| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- # syntax=docker/dockerfile:1.2
- # Wormhole-specific setup for pyth
- FROM pythfoundation/pyth-client:devnet-v2.2@sha256:2ce8de6a43b2fafafd15ebdb723c530a0319860dc40c9fdb97149d5aa270fdde
- USER root
- # At the time of this writing, debian is fussy about performing an
- # apt-get update. Please add one if repos go stale
- RUN apt-get install -y netcat-openbsd python3 && \
- rm -rf /var/lib/apt/lists/*
- ADD solana/keys /opt/solana/keys
- ENV PYTH_KEY_STORE=/home/pyth/.pythd
- # Prepare keys
- WORKDIR $PYTH_KEY_STORE
- RUN cp /opt/solana/keys/pyth_publisher.json publish_key_pair.json && \
- cp /opt/solana/keys/pyth_program.json program_key_pair.json && \
- chown pyth:pyth -R . && \
- chmod go-rwx -R .
- # Rebuild Pyth sources from scratch
- # This comes soon after mainnet-v2.1
- ENV PYTH_SRC_REV=31e3188bbf52ec1a25f71e4ab969378b27415b0a
- ENV PYTH_SRC_ROOT=/home/pyth/pyth-client
- ADD https://github.com/pyth-network/pyth-client/archive/$PYTH_SRC_REV.tar.gz .
- RUN tar -xvf *.tar.gz && \
- rm -rf $PYTH_SRC_ROOT *.tar.gz && \
- mv pyth-client-$PYTH_SRC_REV $PYTH_SRC_ROOT/
- WORKDIR $PYTH_SRC_ROOT/build
- RUN cmake .. && make
- # Prepare setup script
- ADD third_party/pyth/pyth_utils.py /opt/pyth/pyth_utils.py
- ADD third_party/pyth/pyth_publisher.py /opt/pyth/pyth_publisher.py
- RUN chmod a+rx /opt/pyth/*.py
- USER pyth
- ENV PYTH=$PYTH_SRC_ROOT/build/pyth
- ENV READINESS_PORT=2000
|