Hacker News new | ask | show | jobs
by sigjuice 3432 days ago
How is publishing a Dockerfile even remotely reproducible? Almost every Dockerfile is a series of apt-get install, or yum install or pip install commands. How do I know what versions of packages I am downloading or whether they will even be available to download if I build from this Dockerfile, say two months from now?

IMHO, every Dockerfile has left-pad written all over it.

1 comments

Good question.

Reproduciblity is all about the starting point. Computers are electronic, so if your computation requires high entropy from some random source and supposed next run there is not enough entropy your experiment may fail. But that's really really really a corner case. Docker image keeps the state of the starting point (kernel, packages, history of bashrc etc) are kept version controlled. It is as if someone gave you a copy of the virtualbox image.

So how do we lock down?

1) When you start with a Dockerfile, specify the version of the packages you are installing

2) When you want to reproduce, you can rebuild an image with that Dockerdile.

3) But most people are just going to use your image which is always the same now or next year. Building image != launching a container using an image.