3 ms·
> Also, ideally, you'd publicly host the Dockerfile Docker doesn't make it easy to produce a reproducible config. People commonly write Dockerfiles with stuff
by skissane 6y ago
> Also, ideally, you'd publicly host the Dockerfile
Docker doesn't make it easy to produce a reproducible config. People commonly write Dockerfiles with stuff like this in them:
RUN apt-get install -y my-favourite-package
And then which version of my-favourite-package you get depends on what is the latest one on the update servers at a time. Maybe a new version is released tomorrow with a regression bug that breaks everything.
There are ways to get around this problem, but the default ways of doing things in Docker doesn't encourage reproducibility.
- sfblah 6y agoThe solution is to put the actual package into the Dockerfile instead of the reference? Asking because I don't actually know the answer.
- GauntletWizard 6y agoThe solution is to publish the created docker container for examination and reuse in recreating the results. It is possible to create reproducible docker containers, but not with docker.
- yoz-y 6y agoIn one company I worked we hosted our own repo for npm and mirrored all packages we used there. For our own stuff we stored all old versions in it too. The software itself always installed specific version rather than "latest" Another option is to store the whole docker images, granted this will not give you the ability to always rebuild it, but at least you have a "binary" you will be able to run later.
- dmart 6y agoThis is true, although the built Docker image itself (rather than Dockerfile) wouldn’t have these problems. I think in situations where reproducibility is paramount, it would make sense to offer a tarball of the image (`docker save`) along with the Dockerfile itself.
- acd10j 6y agoAfter making Dockerfile you can additionally push your built docker image to docker hub or other public facing repo, People can then directly pull your docker image in case any issue with Dockerfile.