<p>It's a pretty general question, I will try to answer the best I can:
If you want to just build and run an image:
Build the project: npx expo-cli init react_native_app --npm</p>
<ol>
<li>You need to create a <a href="https://www.rockyourcode.com/how-to-run-react-native-expo-web-in-a-docker-container/" rel="nofollow noreferrer">Dockerfile</a> file in your repository</li>
<li>Docker build -t {tag_name} . (You can replace '.' eith the Dockerfile path)</li>
<li>Docker run...</li>
<li>If you want you can create docker compose file to better control your app.
Reference:
<a href="https://www.rockyourcode.com/how-to-run-react-native-expo-web-in-a-docker-container/" rel="nofollow noreferrer">https://www.rockyourcode.com/how-to-run-react-native-expo-web-in-a-docker-container/</a></li>
</ol>

CC BY-SA 4.0
2021-04-14T12:16:06.567Z
hi there @Avi! welcome to our community! Which dependencies be included in the Dockerfile - say Ubuntu based? Do I have to use expo? I've also added project examples.
Ta Mu
CC BY-SA 4.0
2021-04-17T07:25:19.120Z
This base image FROM node:14.13.1-buster-slim is debian based image.
Avi
CC BY-SA 4.0
2021-04-17T22:16:05.317Z
the complete Dockerfile featured in the linked blog article is not trivial for nodejs newbies, but is essential to get a hello world app running in the container. Anyway, it works! thx
Ta Mu
CC BY-SA 4.0
2021-04-14T09:32:42.960Z
2021-04-17T22:16:24.123Z
2021-04-17T22:16:24.123Z
Avi
<p>Given there is a <a href="https://github.com/necolas/react-native-web" rel="nofollow noreferrer">react-native-web solution</a>, what needs to be done to build it and run inside a Docker container?</p>
<ul>
<li>What is the build environment/toolchain?</li>
<li>Which environment is required to run?</li>
</ul>
<p>From what I can find so far, it's not clear how this should work.</p>
<p>UPDATE: <a href="https://codesandbox.io/examples/package/react-native-web" rel="nofollow noreferrer">Project examples</a>.</p>

<docker><containers><cicd><software-engineering>
How to build, package and deploy a react-native-web app in a Docker container?
Ta Mu
# How to build, package and deploy a react-native-web app in a Docker container?

(Asked by: username_0 on 2021-04-08)

Given there is a [react-native-web solution](https://github.com/necolas/react-native-web), what needs to be done to build it and run inside a Docker container?

* What is the build environment/toolchain?
* Which environment is required to run?

From what I can find so far, it's not clear how this should work.

UPDATE: [Project examples](https://codesandbox.io/examples/package/react-native-web).

**Tags:** docker, containers, cicd, software-engineering


---

## 1 answers

### Answer by username_1 on 2021-04-14. Score: 1 | Accepted answer

It's a pretty general question, I will try to answer the best I can:
If you want to just build and run an image:
Build the project: npx expo-cli init react\_native\_app --npm

1. You need to create a [Dockerfile](https://www.rockyourcode.com/how-to-run-react-native-expo-web-in-a-docker-container/) file in your repository
2. Docker build -t {tag\_name} . (You can replace '.' eith the Dockerfile path)
3. Docker run...
4. If you want you can create docker compose file to better control your app.
   Reference:
   <https://www.rockyourcode.com/how-to-run-react-native-expo-web-in-a-docker-container/>

> **Comments:**
> **username_0**: hi there @username_1! welcome to our community! Which dependencies be included in the Dockerfile - say Ubuntu based? Do I have to use expo? I've also added project examples.  
> **username_1**: This base image FROM node:14.13.1-buster-slim is debian based image.  
> **username_0**: the complete Dockerfile featured in the linked blog article is not trivial for nodejs newbies, but is essential to get a hello world app running in the container. Anyway, it works! thx  

---

