Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dockerfile to make yarn install outside of the app folder
With this change: - yarn install/add/upgrade etc will target /usr/src/node_modules - make build will update the node_modules if the yarn.lock is changed This means that if you are inside the container and need to install a new package you can just run `yarn add` and not worry about it creating a node_modules folder owned by root that will be mirrored back to your host machine. Also it means that for users of Docker for Mac, which has a well known issue with slow file access on nfs mounts, yarn will be as fast as it would be locally. Before this change a `yarn install` could take 3-4 mins and an `npm install` could take 15 mins. NOTE: I've had to first copy the package.json and yarn.lock in to /usr/src/ as yarn doesn't support the creation of .bin folders in the modules-folder path yet. v0.28.4 when it releases will fix this.
- Loading branch information