distributor-node.Dockerfile 811 B

1234567891011121314151617181920212223242526
  1. FROM --platform=linux/x86-64 node:14 as builder
  2. WORKDIR /joystream
  3. COPY ./.git .git
  4. COPY ./chain-metadata.json chain-metadata.json
  5. COPY ./types types
  6. COPY ./metadata-protobuf metadata-protobuf
  7. COPY ./distributor-node distributor-node
  8. COPY ./yarn.lock yarn.lock
  9. COPY ./package.json package.json
  10. EXPOSE 3334
  11. # Build & cleanup
  12. # (must be inside a single "RUN", see: https://stackoverflow.com/questions/40212836/docker-image-larger-than-its-filesystem)
  13. RUN \
  14. yarn --frozen-lockfile &&\
  15. yarn workspace @joystream/types build &&\
  16. yarn workspace @joystream/metadata-protobuf build &&\
  17. yarn workspace @joystream/distributor-cli build &&\
  18. find . -name "node_modules" -type d -prune &&\
  19. yarn --frozen-lockfile --production &&\
  20. yarn cache clean
  21. ENTRYPOINT ["yarn", "joystream-distributor"]
  22. CMD ["start"]