apps.Dockerfile 1.1 KB

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