Skip to content
This repository has been archived by the owner on Jan 21, 2019. It is now read-only.

About build process #31

Closed
dgdavid opened this issue Jun 26, 2018 · 0 comments
Closed

About build process #31

dgdavid opened this issue Jun 26, 2018 · 0 comments

Comments

@dgdavid
Copy link
Owner

dgdavid commented Jun 26, 2018

As is stated in the README, to build the application is being used an "updated" version of https://github.com/MaximeD/docker-react-native.

For reference, below is the Dockerfile's diff

diff --git a/Dockerfile b/Dockerfile
index 0b26c64..6bd8575 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
 # Docker image for react native.
 
-FROM node:4.1.1
+FROM timbru31/java-node
 
 MAINTAINER Maxime Demolin <akbarova.armia@gmail.com>
 
@@ -8,11 +8,14 @@ MAINTAINER Maxime Demolin <akbarova.armia@gmail.com>
 # Setup environment variables
 ENV PATH $PATH:node_modules/.bin
 
+RUN apt-get update -q && \
+    apt-get install -qy git
 
-# Install Java
 RUN apt-get update -q && \
-	apt-get install -qy --no-install-recommends python-dev default-jdk
+    apt-get install -qy openjdk-8-jdk
 
+# RUN apt-get update -q && \
+    # apt-get install -qy --no-install-recommends autoconf automake libtool python-dev
 
 # Install Android SDK
 
@@ -47,18 +50,18 @@ RUN (while true ; do sleep 5; echo y; done) | android update sdk --no-ui --force
 RUN npm install -g yarn
 
 ## Install react native
-RUN npm install -g react-native-cli@1.0.0
+RUN npm i -g react-native-cli
 
 ## Clean up when done
 RUN apt-get clean && \
     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
-    npm cache clear
+    npm cache clear --force
 
 
 # Install watchman
-RUN git clone https://github.com/facebook/watchman.git
-RUN cd watchman && git checkout v4.7.0 && ./autogen.sh && ./configure && make && make install
-RUN rm -rf watchman
+# RUN git clone https://github.com/facebook/watchman.git
+# RUN cd watchman && git checkout v4.7.0 && ./autogen.sh && ./configure && make && make install
+# RUN rm -rf watchman
 
 # Default react-native web server port
 EXPOSE 8081
@@ -71,7 +74,7 @@ RUN adduser --disabled-password --gecos '' $USERNAME
 
 
 # Add Tini
-ENV TINI_VERSION v0.10.0
+ENV TINI_VERSION v0.16.1
 ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
 RUN chmod +x /tini
 
@@ -85,4 +88,6 @@ WORKDIR /home/$USERNAME/app
 # this persists the dependencies between builds
 ENV GRADLE_USER_HOME /home/$USERNAME/app/android/gradle_deps
 
+RUN mkdir /home/$USERNAME/.android && chown -R dev:dev /home/$USERNAME/.android
+
 ENTRYPOINT ["/tini", "--"]

and attached the Dockerfile.zip itself in a zip file.

@dgdavid dgdavid closed this as completed Jun 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant