In principal there is nothing wrong with what you say, it's just that you need to now keep track of every possible change to the code and the environment.
For what I am proposing, keeping track of the major versions of dependencies should be enough.
See also sibling comment.