

I like to have something dockerized from the beginning because I want to avoid the
"It works on my machine" problem
A Twitter

I have made some researches, I have found a good article, but I wanted to recreate something on my own.
I also had to change something to make it work, so this could make you save time.
I also had to change something to make it work, so this could make you save time.
In this project, We will use yarn.
From their site:
"Yarn is a package manager that doubles down as project manager. Whether you work on one-shot projects or large mono repo, as a hobbyist or an enterprise user, we've got you covered."
From their site:
"Yarn is a package manager that doubles down as project manager. Whether you work on one-shot projects or large mono repo, as a hobbyist or an enterprise user, we've got you covered."
Using Yarn, we can install create-react-app globally and then create our app with just two commands!
1. Install create-react-app
- yarn global add create-react-app
2. Create the project:
create-react-app docker-react
1. Install create-react-app
- yarn global add create-react-app
2. Create the project:
create-react-app docker-react
You need to create the Dockerfile.
A Dockerfile is a text to create a docker image, and we can set some instructions, line by line.
We can use a multi-stage Dockerfile with 2 steps, one to build dependencies, and one to use Nginx as a Reverse Proxy
https://github.com/FrancescoXX/docker-react/blob/main/Dockerfile
A Dockerfile is a text to create a docker image, and we can set some instructions, line by line.
We can use a multi-stage Dockerfile with 2 steps, one to build dependencies, and one to use Nginx as a Reverse Proxy

Here is the Github Repository you can clone.
It also contains a Dockerfile with a multi-stage Build
I have added a .dockerignore file to avoid copying the node_modules folder https://github.com/FrancescoXX/docker-react
It also contains a Dockerfile with a multi-stage Build
I have added a .dockerignore file to avoid copying the node_modules folder https://github.com/FrancescoXX/docker-react
if you want just to test it, and you have docker installed on your machine, you can run this docker command
docker run -p 8080:80 francescoxx/docker-react:0.0.2
and visit => localhost:8080
docker run -p 8080:80 francescoxx/docker-react:0.0.2
and visit => localhost:8080
End of the 
Thanks for reading!
Please comment on how this process could be improved and if you would like further information on this topic (article, video, etc ...)
Also tell me any problem you had with following these steps, so we can make a better version of it, thanks!

Thanks for reading!
Please comment on how this process could be improved and if you would like further information on this topic (article, video, etc ...)
Also tell me any problem you had with following these steps, so we can make a better version of it, thanks!