apps.Dockerfile 885 B

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