apps.Dockerfile 916 B

12345678910111213141516171819202122232425262728293031
  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 --frozen-lockfile
  8. RUN yarn build:packages
  9. # Second stage to reduce image size, enable it when
  10. # all packages have correctly identified what is a devDependency and what is not.
  11. # It will reduce the image size by about 500MB (down from 2.2GB to 1.7GB)
  12. # # Remove files that are not needed after build.
  13. # # We will re-fetch only dependencies needed for running the apps.
  14. # RUN rm -fr node_modules/
  15. # RUN rm -fr .git/
  16. # FROM node:12
  17. # WORKDIR /joystream
  18. # COPY --from=builder /joystream/ /joystream/
  19. # # Skip installing devDependencies, since we have already built the packages.
  20. # ENV NODE_ENV=production
  21. # RUN yarn install --forzen-lockfile --production
  22. ENTRYPOINT [ "yarn" ]