0

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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