I though Dockerfile ensured that builds are indeed reproducible?
I though Dockerfile ensured that builds are indeed reproducible?
Lots of docker build scripts have the equivalent of
date > file.txt
or curl https://www.random.org/integers/?num=1&min=1&max=1000&col=1&base=10&format=plain&rnd=new > file.txt
Buried deep somewhere in the code.But yeah I don't see any reason why you couldn't theoretically make a reproducible build with Docker.
Buildah from Red Hat has an argument to set this programmatically instead of using the current date, but AFAIK there's no way to do that with plain old docker build.
> I [thought] Dockerfile ensured that builds are indeed reproducible?
The example straightforwardly disproves that.
If you wanted to guarantee reproducibility, a hypothetical purely-functional build system could do that. I personally don't think that's necessary though, or that it would be worth the requisite trade-offs.
That said, the above example isn’t specific to Docker.