maximed / docker-react-native Goto Github PK
View Code? Open in Web Editor NEWDockerfile to run react-native
Dockerfile to run react-native
Thanks for a more explained fork... Following your instructions, I'm getting the following error:
error: no devices/emulators found
This is when I run the instructions as is... Do I need to do anything else?
$ ~/dev/github/public/MaximeD/docker-react-native/react-native.sh init MyAwesomeProjet
This will walk you through creating a new React Native project in /home/dev/app/MyAwesomeProjet
Installing react-native package from npm...
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info attempt registry request try #1 at 8:58:34 PM
npm http request GET https://registry.npmjs.org/react-native
npm http 200 https://registry.npmjs.org/react-native
npm info retry fetch attempt 1 at 8:58:35 PM
npm info attempt registry request try #1 at 8:58:35 PM
npm http fetch GET https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
npm http fetch 200 https://registry.npmjs.org/react-native/-/react-native-0.42.0.tgz
npm info install [email protected] into /home/dev/app/MyAwesomeProjet
npm info installOne [email protected]
npm info preinstall [email protected]
npm WARN peerDependencies The peer dependency react@~15.4.1 included from react-native will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm info attempt registry request try #1 at 8:59:43 PM
npm http request GET https://registry.npmjs.org/babel-core
npm info attempt registry request try #1 at 8:59:43 PM
npm http request GET https://registry.npmjs.org/babel-generator
npm info attempt registry request try #1 at 8:59:43 PM
npm http request GET https://registry.npmjs.org/
..
..
npm http fetch GET https://registry.npmjs.org/errorhandler/-/errorhandler-1.4.3.tgz
npm http 200 https://registry.npmjs.org/csurf
npm http 200 https://registry.npmjs.org/cookie
npm http 200 https://registry.npmjs.org/set-blocking
npm http 200
`npm install --save --save-exact react-native` failed
At this point, it failed with react-native
installation... However, wouldn't the install still install more things?
$ ~/dev/github/public/MaximeD/docker-react-native/react-native-container.sh
dev@oahu:~/app$ cd node_modules/react-native/
dev@oahu:~/app/node_modules/react-native$ yarn
yarn install v0.21.3
info No lockfile found.
[1/4] Resolving packages...
warning xcode > [email protected]: use uuid module instead
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 34.91s.
dev@oahu:~/app/node_modules/react-native$ adb reverse tcp:8081 tcp:8081
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
error: no devices/emulators found
dev@oahu:~/app/node_modules/react-native$
$ android avd
It did end with an error to enable 32bit ...
Gtk-Message: Failed to load module "canberra-gtk-module"
dev@oahu:~/app$ export ANDROID_EMULATOR_FORCE_32BIT=true
However, It couldn't because now it requires KVM
dev@oahu:~/app$ emulator -list-avds
AVD_for_Nexus_S_by_Google
dev@oahu:~/app$ emulator @AVD_for_Nexus_S_by_Google
emulator: WARNING: Increasing RAM size to 1GB
emulator: ERROR: x86_64 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: This user doesn't have permissions to use KVM (/dev/kvm).
At this point, how can I run this Docker Image with an Emulator?
How to create a production build using this dockerfile.
I am using it on Mac machine. My Image size is very very large - 5.84 GB !!
How can we reduce the image size ?
I am not sure why but I had an issue running react-native.sh problem
. However, once I looked closely at the file, I ran docker run --rm -it react-native bash
which helped me. There are couple things which I would have put in the Dockerfile, but that's because of the Environment I work in. Just posting it here if the author decided to put a suggestion for future users.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.