<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Taher Lunavadi</title>
    <description>The latest articles on DEV Community by Taher Lunavadi (@taher07).</description>
    <link>https://dev.to/taher07</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F543806%2F302a8d4f-9596-4db0-b4e4-097ddd77474b.png</url>
      <title>DEV Community: Taher Lunavadi</title>
      <link>https://dev.to/taher07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/taher07"/>
    <language>en</language>
    <item>
      <title>Running a dockerized React Native application</title>
      <dc:creator>Taher Lunavadi</dc:creator>
      <pubDate>Sat, 01 May 2021 21:37:55 +0000</pubDate>
      <link>https://dev.to/taher07/running-a-dockerized-react-native-application-1dd9</link>
      <guid>https://dev.to/taher07/running-a-dockerized-react-native-application-1dd9</guid>
      <description>&lt;h2&gt;
  
  
  Why do we run a React Native application in a docker container?
&lt;/h2&gt;

&lt;p&gt;At times setting up React Native dev environment could be a prick in the spine, hence docker solves all those issues and let's us build a React Native application in a container facilitating testing the application as well.&lt;/p&gt;

&lt;p&gt;In this tutorial, we'll orchestrate a docker container with a bare minimum React Native application with Expo managed workflow.&lt;/p&gt;

&lt;p&gt;We'll use &lt;a href="https://github.com/taher07/dockerized-react-native" rel="noopener noreferrer"&gt;https://github.com/taher07/dockerized-react-native&lt;/a&gt; to complete our task&lt;/p&gt;

&lt;h2&gt;
  
  
  pre-requisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;docker&lt;/li&gt;
&lt;li&gt;docker-compose (which usually comes along with docker but if it's not the case then yeah)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  steps
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;clone the repository using &lt;code&gt;git clone https://github.com/taher07/dockerized-react-native.git my-app&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to the repository and run &lt;code&gt;rm -rf .git/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;docker-compose up&lt;/code&gt;, you gotta give it some time&lt;/li&gt;
&lt;li&gt;Your React Native application would have probably been running by now, go to &lt;a href=""&gt;http://0.0.0.0:19002&lt;/a&gt; from your browser and it would render dev tools in your browser&lt;/li&gt;
&lt;li&gt;Under the &lt;code&gt;connection&lt;/code&gt; section click on &lt;code&gt;Tunnel&lt;/code&gt; and you can now run your expo managed app from the Expo Go app on Android or iOS devices (It has been shown below)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fligrzpmh7pzj2quamvvd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fligrzpmh7pzj2quamvvd.png" alt="Metro"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now let's get into bash specific to docker container as

&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;docker ps&lt;/code&gt; and copy the container id&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;docker exec -it &amp;lt;container_id&amp;gt; bash&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;You're all set to start developing your dockerized React Native application&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Any further discussion on this thread are welcome below!
&lt;/h4&gt;

</description>
      <category>docker</category>
      <category>reactnative</category>
      <category>devops</category>
      <category>container</category>
    </item>
  </channel>
</rss>
