Dockerfile.multisig 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
  2. FROM ghcr.io/certusone/solana:1.10.31
  3. # This image builds an environment to initialize and use a local
  4. # devnet multisig. It uses Pyth's Mesh client.
  5. RUN apt-get update && apt-get install -yq python3 libudev-dev ncat
  6. RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
  7. WORKDIR /root
  8. # Also used by the multisig provisioning script
  9. ENV MULTISIG_SCRIPT_DIR=/root/pyth/multisig-wh-message-builder
  10. WORKDIR $MULTISIG_SCRIPT_DIR
  11. ENV LOCAL_MULTISIG_SCRIPT_DIR=third_party/pyth/multisig-wh-message-builder
  12. # Add a barebones representation of our deps for Docker layer caching
  13. ADD $LOCAL_MULTISIG_SCRIPT_DIR/package.json \
  14. $LOCAL_MULTISIG_SCRIPT_DIR/package-lock.json \
  15. $LOCAL_MULTISIG_SCRIPT_DIR/tsconfig.json \
  16. .
  17. RUN mkdir src # tsc is run as part of the install, add minimal placeholders to satisfy it
  18. RUN touch src/index.ts
  19. RUN --mount=type=cache,target=/home/node/.cache \
  20. npm ci && cp -r node_modules node_modules_cached
  21. RUN rm -rf node_modules && mv node_modules_cached node_modules
  22. # Add the rest of the code. This ensures that real code changes do not affect the layer caching of `npm ci`
  23. ADD third_party/pyth /root/pyth
  24. ADD tilt-devnet/secrets/solana/ /solana-secrets
  25. RUN npm install