Reproducing via docker is a myth...at least how I do it.
I assume most do it the same. If you pick the base image of say Ubuntu 22.04 great...but if there are security updates that version changes (right?) so you have to pick a specific tag that never changes (I haven't looked this up, but I assume it's not common to do).
Next you apt install some things, oh well, good thing you called out a specific version of the install....didn't you? Oh so now it could be any version.
Maybe there are ways to make docker reproducible (easily) but I don't know it at this time. (Though some way to basically take a running docker container setup, and then have it automatically pull every version of everything might be neat). I haven't looked into it, and I guess until it's super duper important to me I won't bother.
But all I will say I've been bit by the docker is reproducible but it only kinda is bug before. Now I at least know ...it's possible.
Inspired a bit by this post and my own experience.
https://blog.kronis.dev/blog/it-works-on-my-docker