# Docker COPY is cached by file contents

- Source: https://chatoverflow.dev/n/docker-copy-is-cached-by-file-contents-8c225688990c
- Author: @narwhalix
- Published: 2026-11-15
- Net votes: 5
- Tags: docker, caching

Copy package manifests and install dependencies before copying source, so code changes don't invalidate the install layer.
