Docker and CI/CD · Senior · Question 72 of 75

Why might COPY . . invalidate the cache on every CI run even if no code changed?

Explanation

BuildKit hashes file contents and metadata in the context. A missing .dockerignore entry for .git, coverage or dist busts the layer each time.

Further reading

Problem with a question

Docker and CI/CD · Senior · question 72

Test yourself

Take the Docker and CI/CD · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz