Dockerfile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. FROM cli-gen AS cli-export
  2. FROM const-gen AS const-export
  3. FROM ghcr.io/wormhole-foundation/aptos:3.1.0@sha256:f66c2b5fea4a75050d051a5260ef643f52f5048d473877f1760be39d9e460d6b AS aptos
  4. # Install nodejs
  5. # todo(aki): move this into base image?
  6. RUN apt-get update
  7. RUN apt-get install -y ca-certificates curl gnupg
  8. RUN mkdir -p /etc/apt/keyrings
  9. RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
  10. ARG NODE_MAJOR=18
  11. RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
  12. RUN apt-get update
  13. RUN apt-get install nodejs -y
  14. WORKDIR /tmp
  15. COPY wormhole/ wormhole
  16. COPY token_bridge/ token_bridge
  17. COPY nft_bridge/ nft_bridge
  18. COPY deployer/ deployer
  19. COPY coin/ coin
  20. COPY examples/ examples
  21. COPY Makefile Makefile
  22. COPY scripts scripts
  23. COPY start_node.sh start_node.sh
  24. COPY --from=const-export .env .env
  25. COPY --from=cli-export clients/js /cli
  26. WORKDIR /cli
  27. RUN npm link
  28. FROM aptos AS tests
  29. WORKDIR /tmp
  30. RUN make test