Docker and CI/CD · Junior · Question 74 of 75
What does docker build --no-cache do?
- ✓Correct answer: Rebuilds every layer instead of reusing cached ones
- 2Builds the image and deletes the build context
- 3Builds the image without saving it on the host
Explanation
Useful when a cached RUN apt-get update or RUN npm ci layer hides newer packages. Normally the cache is what makes rebuilds fast.