Full-stack JavaScript development with Docker
summary
Node backend + React frontend runs inside Docker and achieves working live-reload by combining the new docker for mac and windows runtime, nodemon and a host-to-container bind mount; docker build uses npm-shrinkwrap for layer caching and docker run -v mounts source while a named volume for node_modules keeps Linux binaries isolated. docker-compose encapsulates ports and commands, allows docker-compose run npm install, and adds a proxy (haproxy/nginx) plus DNSMasq to resolve a .dev domain to localhost so the full stack routes and hot reload work.
AI-written summary · about
chapters (15)
- 0:00Start
- 3:24running in a docker container
- 4:05write a docker file
- 5:35set an environment variable
- 7:55use cache versions of old containers
- 9:10build a a docker file
- 10:42map it to port 8000
- 13:39to write a compose file
- 14:25build from the current working directory
- 15:05copy your node modules into this linux environment
- 16:12run npm install inside the container
- 18:28run multiple copies of a container
- 19:19install a new dependency
- 21:23connect to a postgres database
- 31:23switch between pre-built images
related talks
45mDocker for dev
44mDocker and the Path to a Better Staging Environment
27mDesigning a local development environment based on containers
01h 00mDocker for development
28mHow to Get Started with Docker
21mMaking Docker Actually Work
29mWhy You Should Care About Docker
23m12 Factor Frontend Apps through Dockerization
