Ideally you want your docker images to be as light as possible.
Looking at your react applications DockerFile, this is not the case as all the npm packages are already included in the final package.
The only thing you need from the build process is the build folder.
Ideally you want your docker images to be as light as possible.
Looking at your react applications DockerFile, this is not the case as all the npm packages are already included in the final package. The only thing you need from the build process is the build folder.
Have a look at this: https://tiangolo.medium.com/react-in-docker-with-nginx-built-with-multi-stage-docker-builds-including-testing-8cc49d6ec305
I could do a PR request with this change but this your learning project and hence I will leave this for you to learn