distributor-node.Dockerfile 815 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. EXPOSE 3334
  9. # Build & cleanup
  10. # (must be inside a signle "RUN", see: https://stackoverflow.com/questions/40212836/docker-image-larger-than-its-filesystem)
  11. RUN \
  12. yarn --frozen-lockfile &&\
  13. yarn workspace @joystream/types build &&\
  14. yarn workspace @joystream/metadata-protobuf build &&\
  15. yarn workspace @joystream/distributor-cli build &&\
  16. find . -name "node_modules" -type d -prune &&\
  17. yarn --frozen-lockfile --production &&\
  18. yarn cache clean
  19. ENV CONFIG_PATH ./distributor-node/config/docker/config.docker.yml
  20. ENTRYPOINT ["yarn", "joystream-distributor"]
  21. CMD ["start"]