Hi Carsten,
Thanks, no doubt you're right about that -- keeping the binary image
is the best way to make sure one has access to the correct versions.
(ideally along with the Dockerfile). It's particularly cool that you
could always diff the images to see what layers had changed, at least
in a crude way.
As you say, the registry goes a long way to this, though I think some
care would have to be taken to prevent updates from overwriting
previous images. The docker registry design isn't really concerned
with preserving archival states -- most users will be more concerned
about working with an image that has not been rebuilt recently, and
thus received all the security updates and so forth. You'd have to do
something to 'lock' a registry entry, or otherwise end up basically
storing just image tarballs.
I suspect the concern from archiving Dockerfiles alone is much less of
an issue if the Dockerfile installs entirely from Linux distribution
binaries, (where all the software is packaged into specific releases
that are maintained and archived) than say, a Dockerfile that installs
R packages from CRAN or other less persistent locations (of course
CRAN 'archives' packages that it removes, but installing becomes
rather manual then). It's an interesting question of how one might
write a Dockerfile so that it is most likely to be stable in the
future.
Yeah, packrat is clearly trying to solve that problem, but I haven't
been thrilled with it so far. It doesn't capture dependencies on
external libraries like libxml2, etc, though most of those tend to be
more stable. More to the point, in my experience it has always felt
rather invasive in my workflow -- I spend time 'managing packrat' and
having packrat scripts running in the background all the time, or
manually telling packrat that using the newer version of the software
is gonna be okay. Perhaps that's gotten better, maybe others could
comment.
Speaking of running old versions of code, I think the GRANbase package
approach is pretty promising:
http://blog.revolutionanalytics.com/2014/08/gran-and-switchr-cant-send-you-back-in-time-but-they-can-send-r-sort-of.html
It's nice to be able to run on the old systems when necessary, rather
than the packrat model of simply locking you into a particular version
of everything.