What happens when you put your app in a Docker container
Docker build cache: what a new version of your app rebuilds, pushes and pulls
You fix one line of your app. Docker must build a new image, because an image never changes after it is built. With the right Dockerfile, the new build skips almost every step. With the steps in the wrong order, it does nearly all of them again.
-
1
Back on your laptop, you find the bug: one line kept some memory for each request. You delete it, and version 1.1 is ready, while the server still runs 1.0.
-
2
Version 1.0 carried every layer of its image to the registry, then to the server. Will 1.1 have to carry them all again?
The rest of this episode is for subscribers
Subscribe to read every premium episode. You can cancel when you want.
Paid yearly: $99 instead of $119.88