Setting up the development environment using docker.
> docker pull jungseoro/react-native
or
> docker build . -t <image name>
and modify services name
in docker-compose.yml
If react-native project does not exist, make it with command below and mv repo in the project.
> docker run -it --rm -v <PROJECT_DIR>:/vol jungseoro/react-native sh -c "cd /vol && npx react-native init <PROJECT_NAME>"
> mv react-native-dockerize <PROJECT_DIR>/<PROJECT_NAME>/
This docker supports device debugging, so you need an adb pair on the same wifi over Android OS 11.
Please refer to Android Developers for details.
> docker-compose up
If the app is not installed on the device, build it with command below, otherwise run the app.
> docker exec -it react-native sh -c "cd /vol && npx react-native run-android"