Container for working with React Native on Android with a minimal install footprint
160
Assumes that app is the directory that contains your package.json.
docker run --rm \
-v `pwd`/examples/links/app:/work/app \
chrisgarrett/react-native-android:24.3.4 \
npm start
When the container loads any folders mouned in /work/libs will automatically
be linked npm link to your app. Again, this assumes that each subfolder
contains a package.json file. For an example see examples/links.
docker run --rm \
-v `pwd`/examples/links/libs/mylib1:/work/app \
chrisgarrett/react-native-android:24.3.4 \
npm start
docker run --rm \
-v `pwd`/examples/links/app:/work/app \
-v `pwd`/examples/links/libs/mylib1:/work/libs/mylib1 \
chrisgarrett/react-native-android:24.3.4 \
npm start
Here is an example compose file:
version: '2'
services:
app:
container_name: links_app
image: chrisgarrett/react-native-android:6.9.1
command: npm start
ports:
- 3000:3000
volumes:
- ./examples/links/app:/work/app
- ./examples/links/libs/mylib1:/work/libs/mylib1
depends_on:
- mylib1
mylib1:
container_name: links_lib1
image: chrisgarrett/react-native-android:6.9.1
command: npm start
volumes:
- ./examples/links/libs/mylib1:/work/app
Run with:
docker-compose -p links up
Content type
Image
Digest
Size
1.2 GB
Last updated
about 9 years ago
docker pull chrisgarrett/react-native-android:24.3.4