Sign inSign up

chrisgarrett/react-native-android

By chrisgarrett

Updated about 9 years ago

Container for working with React Native on Android with a minimal install footprint

Image
0

160

chrisgarrett/react-native-android repository overview

chrisgarrett/react-native-android

  • Container for working with React Native on Android with a minimal install footprint

Versions / packages

  • node 8.2.1
  • openjdk 8u131

Usage

Standalone app:

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
App + libraries

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.

  1. Start your library project first
docker run --rm \
      -v `pwd`/examples/links/libs/mylib1:/work/app \
      chrisgarrett/react-native-android:24.3.4 \
      npm start
  1. Next start your application mounting your library project
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
Docker Compose

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

Credits

Tag summary

Content type

Image

Digest

Size

1.2 GB

Last updated

about 9 years ago

docker pull chrisgarrett/react-native-android:24.3.4