Skip to content

Commit a53b3c1

Browse files
gengjiawenkelset
authored andcommitted
Official Android Docker for react native (#36)
Provide an official docker to the community and make the ci easier.
1 parent 610230f commit a53b3c1

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

proposals/0003-Official-Docker.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Official Android Docker for react native
3+
author:
4+
- Daniel Geng
5+
date: 2018-10-5
6+
---
7+
8+
# RFC0003: Official Android Docker for react native
9+
10+
## Summary
11+
12+
Provide an official docker to the community and make the ci easier.
13+
14+
## Basic example
15+
16+
Not related.
17+
18+
## Motivation
19+
20+
Docker is a fantastic technology. With this, react native users can easily integrate ci to their code.
21+
Also you can easily debug react native code without setting up all the tools needed like android sdk and nodejs.
22+
Like if you want to build RNTester after you make some change, you can just use something like this:
23+
```bash
24+
docker run --rm --name hei -v $PWD:/pwd -w /pwd gengjiawen/react-native /bin/sh -c "./gradlew RNTester:android:app:assembleRelease"
25+
```
26+
27+
## Detailed design
28+
29+
I have an wip [pr](https://github.com/facebook/react-native/pull/21477), things need to do
30+
* Fix current docker file
31+
* Add publish docker script file
32+
* Hook publish docker script when release a new version
33+
34+
## Drawbacks
35+
36+
Maybe a little cumbersome when update related android tools because now it use a prebuilt docker image.
37+
But if we build the image in the circle ci, the build time will became longer.
38+
39+
## Alternatives
40+
41+
There are many android docker, but most of them lacks node ,ndk or buck(Although I don't use it, but some people do).
42+
Also react native developers needn't to find the right docker since we already provide it.
43+
44+
## Adoption strategy
45+
React Native developers may need to familiar the basics of docker and ci, but this became much easier since
46+
much more people are using it.
47+
48+
## How we teach this
49+
50+
We should add this to react native website and maybe add it to template and provide an example to demo this.
51+
52+
## Unresolved questions
53+
54+

0 commit comments

Comments
 (0)