🐳 Compare Docker images
brew install moul/moul/docker-diff
Or brew tap moul/moul and then brew install docker-diff
sudo git clone https://github.com/moul/docker-diff /opt/docker-diff sudo ln -s /opt/docker-diff/docker-diff /usr/local/bin
echo"source /opt/docker-diff/docker-diff-completion">>~/.zshrc
source~/.zshrcComparing changes between alpine:3.2 and alpine:3.3.
$ ./docker-diff alpine:3.2 alpine:3.37,8c7< ---s--x--x 9944 bin/bbsuid< -rwxr-xr-x 800936 bin/busybox---> -rwxr-xr-x 809128 bin/busybox63d61< lrwxrwxrwx 0 bin/rc-status82d79< -rwxr-xr-x 9872 bin/uniso92,94d88< drwxr-xr-x 0 etc/acpi/< drwxr-xr-x 0 etc/acpi/PWRF/< -rwxr-xr-x 19 etc/acpi/PWRF/00000080105,106c99,100< -rw-r--r-- 45 etc/apk/repositories< -rw-r--r-- 12 etc/apk/world---> -rw-r--r-- 95 etc/apk/repositories> -rw-r--r-- 51 etc/apk/world108,129d101< -rw-r--r-- 328 etc/conf.d/bootmisc< -rw-r--r-- 876 etc/conf.d/consolefont< -rw-r--r-- 55 etc/conf.d/cron< -rw-r--r-- 348 etc/conf.d/devfs< -rw-r--r-- 117 etc/conf.d/dmesg< -rw-r--r-- 1402 etc/conf.d/fsck< -rw-r--r-- 59 etc/conf.d/hostname< -rw-r--r-- 857 etc/conf.d/hwclock< -rw-r--r-- 911 etc/conf.d/keymaps< -rw-r--r-- 105 etc/conf.d/killprocs< -rw-r--r-- 14 etc/conf.d/klogd< -rw-r--r-- 121 etc/conf.d/localmount< -rw-r--r-- 124 etc/conf.d/modloop< -rw-r--r-- 898 etc/conf.d/modules< -rw-r--r-- 1335 etc/conf.d/netmount< -rw-r--r-- 106 etc/conf.d/ntpd< -rw-r--r-- 48 etc/conf.d/rdate< -rw-r--r-- 357 etc/conf.d/staticroute< -rw-r--r-- 16 etc/conf.d/syslog< -rw-r--r-- 76 etc/conf.d/tmpfiles< -rw-r--r-- 282 etc/conf.d/urandom< -rw-r--r-- 40 etc/conf.d/watchdog131c103< -rw-r--r-- 283 etc/crontabs/root---> -rw------- 283 etc/crontabs/root133c105< -rw-r--r-- 810 etc/group---> -rw-r--r-- 683 etc/group137,185c109
[...]Comparing changes between ubuntu:wily and ubuntu-debootstrap:wily.
$ ./docker-diff ubuntu:wily ubuntu-debootstrap:wilyUnable to find image 'ubuntu:wily' locallywily: Pulling from library/ubuntucde2d46a079b: Pulling fs layere189717d7053: Pulling fs layer7147b2632305: Pulling fs layerd8a164f81acc: Pulling fs layer7147b2632305: Verifying Checksum7147b2632305: Download completee189717d7053: Verifying Checksume189717d7053: Download completed8a164f81acc: Verifying Checksumd8a164f81acc: Download completecde2d46a079b: Verifying Checksumcde2d46a079b: Download completecde2d46a079b: Pull completee189717d7053: Pull complete7147b2632305: Pull completed8a164f81acc: Pull completeDigest: sha256:f399d4101e8e41196b9bc58a96e63d17e3d5fcef702df2bda05e166dc3b5ac3cStatus: Downloaded newer image for ubuntu:wilyUnable to find image 'ubuntu-debootstrap:wily' locallywily: Pulling from library/ubuntu-debootstrap15b60992a765: Pulling fs layer56590e6e34d5: Pulling fs layer56590e6e34d5: Verifying Checksum56590e6e34d5: Download complete15b60992a765: Verifying Checksum15b60992a765: Download complete15b60992a765: Pull complete56590e6e34d5: Pull completeDigest: sha256:0d464ac0c99ecb124f5cc078b2f3db5e33699d030d90c27164af38a721a2b7f2Status: Downloaded newer image for ubuntu-debootstrap:wily...13,14c13,14< -rwxr-xr-x 101928 bin/df< -rwxr-xr-x 118272 bin/dir---> -rwxr-xr-x 101960 bin/df> -rwxr-xr-x 118368 bin/dir18c18< -rwxr-xr-x 31264 bin/echo---> -rwxr-xr-x 31296 bin/echo27a28> -rwxr-xr-x 363680 bin/ip33c34< -rwxr-xr-x 118272 bin/ls---> -rwxr-xr-x 118368 bin/ls34a36> -rwxr-xr-x 474352 bin/machinectl42c44< -rwxr-xr-x 670304 bin/networkctl---> -rwxr-xr-x 670296 bin/networkctl44a47,48> -rwsr-xr-x 70768 bin/ping> -rwsr-xr-x 61520 bin/ping646c50< -rwxr-xr-x 31360 bin/pwd---> -rwxr-xr-x 31392 bin/pwd50c54
[...]- docker-promote: promote a docker image only if it is different than than the one presently there. (@Wealthforge-Technologies)
MIT