Add a best practice to reduce cache invalidations

inspired by https://github.com/docker-training/docker-fundamentals/pull/206

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Merge pull request #8461 from SvenDowideit/copy-specific-files-from-context

Add a best practice to reduce cache invalidations