DEV Community

Discussion on: A crash course to the most important Docker concepts and their commands

Collapse
 
alexanderrykhlitskiy profile image
Alexander Rykhlitskiy • Edited

Thanks for the post. Just one small note.
Isn't it better to avoid using

COPY . .
Enter fullscreen mode Exit fullscreen mode

as container will be rebuilt completely after any minor code change? Maybe it's better to use

COPY package.json package-lock.json ./
Enter fullscreen mode Exit fullscreen mode

?

Collapse
 
softchris profile image
Chris Noring

hey Alexander.. you are right.. That's definitely an omptimization you could do. Just wanted to show something working initially..