apps.Dockerfile 1011 B

1234567891011121314151617181920212223242526272829303132
  1. FROM --platform=linux/x86-64 node:14 as builder
  2. WORKDIR /joystream
  3. RUN rm -fr /joystream/pioneer
  4. # Do not set NODE_ENV=production until after running yarn install
  5. # to ensure dev dependencies are installed.
  6. RUN yarn --forzen-lockfile
  7. RUN yarn workspace @joystream/types build
  8. RUN yarn workspace @joystream/metadata-protobuf build
  9. RUN yarn workspace query-node-root build
  10. # Second stage to reduce image size, enable it when
  11. # all packages have correctly identified what is a devDependency and what is not.
  12. # It will reduce the image size by about 500MB (down from 2.2GB to 1.7GB)
  13. # # Remove files that are not needed after build.
  14. # # We will re-fetch only dependencies needed for running the apps.
  15. # RUN rm -fr node_modules/
  16. # RUN rm -fr .git/
  17. # FROM node:12
  18. # WORKDIR /joystream
  19. # COPY --from=builder /joystream/ /joystream/
  20. # # Skip installing devDependencies, since we have already built the packages.
  21. # ENV NODE_ENV=production
  22. # RUN yarn install --forzen-lockfile --production
  23. ENTRYPOINT [ "yarn" ]