can I develop react-native app inside docker image

13,499

I know its an old post but might help some one else.

I managed to run expo-cli in a docker image and do remote development using VS Code. Wrote a blog post explaining the work flow. Can check the post here.

All the docker files are pushed to git.

Share:
13,499
S N
Author by

S N

Hands on application development, working on various technologies towards goal of assisting end users. Current role is focused on Data engineering, getting data from numerous sources and putting in one RDBMS, via different ETL scripts written in R, Python, Linux Shell scripts. Larger datasets are loaded in Hadoop cluster. Skillset: R, Python, Docker, gitlab, CI/CD, Hadoop, RDBMS, SQL Server, Linux, ASP.NET Core/MVC 5, React, ASP.NET WEB API, C#, HTML 5, CSS3, Bootstrap, Kendo UI, jQuery, Certification: Cloudera Certified Hadoop Developer(2014 - December), R Programming (Coursera - 2013) Technologies can be learnt I believe, having right mindset, right working environment and well defined career progression, good worklife balance and right compensation benefits are intertwined factors to make a happy employee and happy employer.

Updated on June 19, 2022

Comments

  • S N
    S N almost 2 years

    My development machine is MacBook Pro, on which I'm trying to create a docker image based on Ubuntu 16.04 for developing React-Native apps. I'm aware I can install react native, android, cli etc directly on Mac but I'm trying to avoid, as docker is better for porting code easily using git CI/CD pipeline as well as maintaining packages etc versions.

    I couldn't find any decent workable solution, few URLs that I referred are given below for your reference.

    1. https://medium.com/@hmajid2301/running-expo-react-native-in-docker-ff9c4f2a4388
    2. https://github.com/react-native-community/docker-android/blob/master/Dockerfile
    3. https://github.com/symbiote/docker-project/blob/master/node/Dockerfile

    My Dockerfile is as following at the moment, its building the image but Expo app doesn't seem to open my react native app runing.

    FROM node:8.11
    
    RUN npm install -g grunt-cli \
        && npm install -g brunch \
        && npm install -g bower \
        && npm install -g yarn \
        && npm install -g create-react-native-app \
        && npm install -g react-native-cli \ 
        && npm install -g expo-cli 
    EXPORT 3000 19000 19001
    
    CMD ["/bin/bash"]
    

    Has anyone successfully setup Docker image for development of react native mobile apps? If yes, please share your knowledge.

    Thanks.