Given there is a react-native-web solution, 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.

1 Answer 1


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 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/
  • 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
    Apr 14, 2021 at 12:16
  • This base image FROM node:14.13.1-buster-slim is debian based image.
    – Avi
    Apr 17, 2021 at 7:25
  • 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
    Apr 17, 2021 at 22:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.