- Install Docker
npm run pre-dev
npm run dev
- depending on the speed of your machine this may take 5 minutes
Note: since although node_module
is mounted between the host machine and the guest/docker machine, it is safest to run npm install
in the docker machine because of OS-specific dependencies. Therefore, the way I add a new package is by manually adding the package & version (get the version from npmjs.com if necessary) into the package.json
file and then hitting Ctrl+C
to kill the docker/webpack-dev-server and then typing npm run dev
again to reboot the docker/webpack-dev-server, which will also install the new package in the package.json
file, as the RUN
command in the Dockerfile
includes an npm install
statement. Since the docker machine can detect that other previously installed packages exist in the mounted node_modules
folder, the docker machine will only have to install the new package (but will still take a minute or so to loop through all packages and update any ones that need to be updated). So this whole process is still a bit slow, but not too slow, and it would be better if we could come up with a slightly faster process for adding an npm package.
As of 2018_OCT_14, this setup works on macOS High Sierra 10.13.6 with Docker Version 18.06.0-ce-mac70 (26399)
This project uses the following technologies:
The project is also using WebStorm as the primary development environment.
- If you want to contribute, contact John directly at johnsimerlink at gmail dot com