Good question and I'd have to think about that. Once you've created the project once you won't need `create-react-app` installed. Right? So you don't need that bloat.
Hey Peter, great article. I think what Earle is asking is why do we need to run `create-react-app` locally before creating the Dockerfile? This means that creating new applications requires the correct version of NPM and create-react-app locally before developing it in docker.
Comment
Good question and I'd have to think about that. Once you've created the project once you won't need `create-react-app` installed. Right? So you don't need that bloat.
One solution would be to do something like
> docker container run -it react:app bash
$ npm add create-react-app
$ create-react-app myinitialproject
And when after you exit, only add the created project to the git repo.
Parent comment
Hey Peter, great article. I think what Earle is asking is why do we need to run `create-react-app` locally before creating the Dockerfile? This means that creating new applications requires the correct version of NPM and create-react-app locally before developing it in docker.