Dockerfile.pyth_relay 804 B

123456789101112131415161718192021222324252627
  1. FROM node:16-alpine@sha256:72a490e7ed8aed68e16b8dc8f37b5bcc35c5b5c56ee3256effcdee63e2546f93
  2. ARG P2W_BASE_PATH=/usr/src/pyth2wormhole
  3. RUN apk --no-cache --update add python3 build-base # Needed by the Ethereum build
  4. WORKDIR ${P2W_BASE_PATH}/ethereum
  5. ADD ethereum .
  6. RUN npm install && npm run build
  7. RUN apk del build-base # No longer needed after EVM build
  8. ARG P2W_RELAY_REL_PATH=third_party/pyth/p2w-relay
  9. WORKDIR ${P2W_BASE_PATH}/${P2W_RELAY_REL_PATH}
  10. ADD ${P2W_RELAY_REL_PATH} .
  11. RUN npm ci && npm run build && npm cache clean --force
  12. # If you are building for production
  13. # RUN npm ci --only=production
  14. RUN mkdir -p /app/pyth_relay/logs
  15. RUN addgroup -S pyth -g 10001 && adduser -S pyth -G pyth -u 10001
  16. RUN cp ${P2W_BASE_PATH}/ethereum/devnet_mnemonic.txt .
  17. RUN chown -R pyth:pyth .
  18. USER pyth