Build your React Native app with Webpack and Babel https://habd.as/code/react-native-webpack-starter-kit/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # DOCKER-VERSION 1.8.2
  2. #
  3. # React Native Webpack Starter Kit
  4. # https://git.habd.as/jhabdas/react-native-webpack-starter-kit
  5. #
  6. # Demonstrates use of Starter Kit in a virtualized Linux development environment.
  7. # Helps enable React Native development for Windows. OS X workflows also possible.
  8. # Pull base image
  9. FROM node:argon
  10. # Set environment variables
  11. ENV NODE_ENV development
  12. ENV KIT_VERS v2.29.0
  13. ENV WATCHMAN_VERS v4.5.0
  14. # Fetch and install
  15. RUN \
  16. cd /tmp && \
  17. wget https://github.com/jhabdas/react-native-webpack-starter-kit/archive/$KIT_VERS.tar.gz && \
  18. mkdir -p /app && \
  19. tar --strip-components=1 -xzf $KIT_VERS.tar.gz -C /app && \
  20. rm -f $KIT_VERS.tar.gz && \
  21. cd /app && \
  22. npm install --$NODE_ENV
  23. # Install watchman from source
  24. RUN \
  25. apt-get update && apt-get install -y python-dev && \
  26. mkdir -p /tmp/watchman && \
  27. wget https://github.com/facebook/watchman/archive/$WATCHMAN_VERS.tar.gz && \
  28. tar --strip-components=1 -xzf $WATCHMAN_VERS.tar.gz -C /tmp/watchman && \
  29. cd /tmp/watchman && \
  30. ./autogen.sh && ./configure && make && make install && \
  31. rm -f $WATCHMAN_VERS.tar.gz && rm -rf /tmp/watchman
  32. # Mount to local file system
  33. VOLUME /app/src
  34. # Set current working directory
  35. WORKDIR /app
  36. # Run it
  37. CMD ["npm", "start"]
  38. # Expose ports
  39. EXPOSE 8080
  40. EXPOSE 8081
  41. EXPOSE 8082