Diff docker registry images

169 views Asked by At

Recently the centos images in the global docker registry were updated (~4 days ago it seems). Before the update, I could successfully build off of the Centos 6 image but now I have some installation errors for some packages. When I look at the images from before and after, and then attempt to follow version history it looks something like

f1b10cd84249 -->  b9aeeaeb5e17 (originally worked)
             \->  fb9cc58bde0c -->  a005304e4e74 (current version where my code breaks)

where the arrows show how the image was updated (left is oldest while right is newest). I'm curious as to how the images are different. Is there anyway to do a diff of the a005304e4e74 and b9aeeaeb5e17 images?

1

There are 1 answers

0
Adrian Mouat On

I've never tried, but I guess you could do:

$ docker export -o f1.tar b9aeeaeb5e17
$ docker export -o f2.tar a005304e4e74
$ diff <(tar -tvf f1.tar | sort) <(tar -tvf f2.tar | sort)

Export will create a tar of the filesystem, which we then use to get a diff of the file differences. (I got the diff syntax from Diff between two .tar.gz file lists in liunx )

You might find just running docker history on the images gives you enough information though.