How to Speed up Docker Development! 🐳 Hot Reloading, Debuggers, and More!

preview_player
Показать описание
Docker is a powerful tool for building and deploying applications, but when getting started, development can be slow and frustrating... 😡

1) Enable hot reloading with nodemon and volume mounts
2) Configure the node debugger to work from inside the container
3) Set up docker-compose to encode all of the necessary configuration for development

---

Timestamps:
00:00 - Intro
00:53 - Sample app overview
01:24 - Build + run
02:20 - Rebuilding image to make change
03:38 - Setting up nodemon + volume mounts
06:20 - Setting up inspect debugger
08:07 - Demonstrating debugger usage

---
Join the Community:

---
Community size at time of posting:
- Subscribers: 15680
- Channel Views: 477078
Рекомендации по теме
Комментарии
Автор

Boom! Just what I was looking for. Clear and concise. Thanks man 😃

slinco
Автор

Oh my god thank you so much! I spent all day yesterday on SO trying to find the right parameter to pass in for the volume. This explanation was so much easier to follow, and I feel like I have a better idea of how docker works in general.

harbingerization
Автор

I love how you break everything down to understandable elements in your videos!

CritiKaster
Автор

Ohhh man, you are a godsend!!! The only docker hot-reload tutorial that really works - by simply breaking the linkage between node_modules and installing nodemon globally in the container! I still have some other problems, but at least you got me working. You made my day, honestly. Sub.

aram
Автор

Solid tutorial, very clear. Didn’t know how to use the debugger like this.

parttimelarry
Автор

Don't use compose its a crutch that will bite you later on when you need to do something more complex. Just take that run command stick it in a bash script. Its just as fast and way more extensible for the future

pythonBlender
Автор

I'm new with Docker, but this tutorial was excelent. Thank you so much

jcsoftdev
Автор

Playing with docker. Was frustrated with parameters in "docker run", so thanks for showing docker compose ;)

funkylosik
Автор

Just saw your video on the Traversy Media channel. It was very good!

alexIVMKD
Автор

Nice. Managed to get my project to hot reload (still needed to hit the refresh button on my browser though sadly) once I changed my nodemon run command to nodemon --legacy-watch. Now if only Docker Desktop's beta feature of "Dev Environments" can work properly... 😅

ewliang
Автор

Thank you for the explanation, this is what I'm looking for!

luthfi
Автор

This got to be your best video so far, I visit it sometimes just to refresh my mind. May I ask your thoughts on daemonless container engines like podman?

mikopiko
Автор

Brilliant docker tips, nice and to the point! Thank you 👍

LifestyleLogger
Автор

Great stuff! Pretty much exactly what I was looking for and even more.

notcompletelyinsane
Автор

Nice video! But we don't need the second volume command as it does not copy node_modules folder. Inspect it using docker exec sh command. And we need to add -L in package.json after nodemon for lagacy commands

ritik
Автор

Great video! Thank you for making this, super clear!

jaxuys
Автор

Hey Sir, hope you're fine.

May I ask you a question?

What if I install a dependency, should I always rebuild the container?

GabrielPerinazzo
Автор

Its like you understood my problem! Thanks!

moseskamau
Автор

I did everything as it is done on the video but the hot reload does not work. Am I missing something??

I installed nodemon in the container using this command:
RUN npm install -g nodemon

techtalk
Автор

immediately hit subscribe after watching your video!

sonvu