Dockerfile 789 B

1234567891011121314151617181920212223
  1. FROM node:16-alpine@sha256:004dbac84fed48e20f9888a23e32fa7cf83c2995e174a78d41d9a9dd1e051a20
  2. # Build ETH
  3. WORKDIR /usr/src/ethereum
  4. COPY ethereum/package.json ethereum/package-lock.json ./
  5. RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
  6. npm ci
  7. COPY ethereum .
  8. # Build Wormhole SDK
  9. WORKDIR /usr/src/sdk/js
  10. COPY sdk/js/package.json sdk/js/package-lock.json ./
  11. RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
  12. npm ci
  13. COPY sdk/js .
  14. # Build p2w-sdk in dir preserving directory structure
  15. WORKDIR /usr/src/third_party/pyth/p2w-sdk
  16. COPY third_party/pyth/p2w-sdk/package.json third_party/pyth/p2w-sdk/package-lock.json ./
  17. RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
  18. npm ci
  19. COPY third_party/pyth/p2w-sdk .
  20. RUN npm run build-test