DEV Community

Discussion on: Run a React App in a Docker Container

Collapse
 
jwankhalaf profile image
Jwan Khalaf • Edited

Thanks for the article. I have followed along and all seems to build fine. However when I run the image and navigate to localhost:8080 I get a blank page with the text Error: Failed to fetch.

Any ideas on why this might be happening?

Also, what does the -s do in CMD ["serve", "-p", "80", "-s", "."]

Collapse
 
jwankhalaf profile image
Jwan Khalaf

Ignore the first part of my question. The Error: Failed to fetch is what my ReactJS app does when it can't mak calls to the API. :)