Use this image to start an Expo server or create a react native app using create-react-native-app.
591
docker run -it --rm -v "$PWD:/app" craigrhodes/react-native create-react-native-app <app_name>
Replace <app_name> with whatever you want to call your react native app.
Go into the top-level project directory and run the command:
docker run -it --rm -p 19000:19000 -p 19001:19001 -v "$PWD:/app" -e REACT_NATIVE_PACKAGER_HOSTNAME=<your_ip_address> craigrhodes/react-native
Be sure to replace <your_ip_address> with your computer's actual public hostname or IP address.
When the terminal prints a QR code, scan it from the Expo client app from an iOS or Android device. Don't forget to shake the device to disable Live Reloading, then shake again to enable Hot Reloading!
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y curl git build-essential libtool m4 automake pkg-config libssl-dev python3-dev
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs
RUN git clone https://github.com/facebook/watchman.git && cd watchman &&
./autogen.sh && ./configure && make && make install && rm -rf /watchman
RUN npm install -g flow-bin
RUN npm install -g create-react-native-app
WORKDIR /app
EXPOSE 19000
EXPOSE 19001
CMD ["npm", "start"]
Content type
Image
Digest
Size
184 MB
Last updated
almost 9 years ago
docker pull craigrhodes/react-native