distributor-node.Dockerfile 861 B

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