Right, all builds are dependent on their inputs.
Your inputs determine your outputs.
If your input(s) change, then so does your output.
We are saying the same thing here, I'm just trying to point out this is exactly how docker build works, but rather it is more about what you are willing to put into your docker build.