|
|
|
|
|
by giovannibonetti
2185 days ago
|
|
> We lose our cache frequently though because we're not taking special care to centralize or persist the layer cache. We should, for sanity. Do you use digests (@sha256:...) in the Dockerfile source image (FROM ...) to ensure you are always using the same layer? If not, that is probably the reason why your cache is falling so often. |
|
I think that's happening is our garbage collection on old docker layers is being too aggressive. But because it works so well between commits, pushes to CI and etc - I don't worry about it. The majority of the time I want a cache to work, it works. So it's been a low priority thing for me to fix haha.
edit: Oh, and I forgot, we may have CI jobs running on different machines. Which of course would also miss caches, since we're not persisting the layers on our registry. I'm not positive on this one though, since like I said it never seems to fail between commit pushes _(say to a PR during review, dev, etc)_. /shrug