apps.Dockerfile 998 B

12345678910111213141516171819202122232425262728293031323334
  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. ARG TYPEGEN_WS_URI
  8. # Do not set NODE_ENV=production until after running yarn install
  9. # to ensure dev dependencies are installed.
  10. RUN yarn --frozen-lockfile
  11. RUN yarn build:packages
  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" ]