apps.Dockerfile 978 B

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