Docker and CI/CD · Senior · Question 17 of 75
What is the difference between --cache-to ...,mode=min and mode=max?
- ✓Correct answer:
minexports final-stage layers only;maxexports all stages - 2
minkeeps the cache for a day;maxkeeps it for a month - 3
mincompresses the cache harder;maxkeeps it uncompressed
Explanation
With multi-stage builds, max caches the builder stages too, so dependency installs are reused. It costs more storage and upload time.