A copied input determines whether a later RUN result can be reused.

Docker rebuilds reuse recorded work, including stale work

Docker’s build cache stores results of build operations so a later build can reuse work whose relevant inputs still match. A cache hit does not mean the command ran again and produced identical output. It means the builder accepted an existing result. That distinction matters for package installation, generated timestamps, remote downloads, and any operation whose output could change without a corresponding change to its declared inputs. ...

February 20, 2028 · 4 min · XB Field Notes