项目作者: moul

项目描述 :
:whale: Compare Docker images
高级语言: Shell
项目地址: git://github.com/moul/docker-diff.git
创建时间: 2016-02-05T14:43:29Z
项目社区:https://github.com/moul/docker-diff

开源协议:MIT License

下载


docker-diff

:whale: Compare Docker images

Installation

On macOS via Homebrew

brew install moul/moul/docker-diff

Or brew tap moul/moul and then brew install docker-diff

Linux

zsh

  1. sudo git clone https://github.com/moul/docker-diff /opt/docker-diff
  2. sudo ln -s /opt/docker-diff/docker-diff /usr/local/bin
  3. echo "source /opt/docker-diff/docker-diff-completion" >> ~/.zshrc
  4. source ~/.zshrc

Usage

See full examples.


Comparing changes between alpine:3.2 and alpine:3.3.

  1. $ ./docker-diff alpine:3.2 alpine:3.3
  1. 7,8c7
  2. < ---s--x--x 9944 bin/bbsuid
  3. < -rwxr-xr-x 800936 bin/busybox
  4. ---
  5. > -rwxr-xr-x 809128 bin/busybox
  6. 63d61
  7. < lrwxrwxrwx 0 bin/rc-status
  8. 82d79
  9. < -rwxr-xr-x 9872 bin/uniso
  10. 92,94d88
  11. < drwxr-xr-x 0 etc/acpi/
  12. < drwxr-xr-x 0 etc/acpi/PWRF/
  13. < -rwxr-xr-x 19 etc/acpi/PWRF/00000080
  14. 105,106c99,100
  15. < -rw-r--r-- 45 etc/apk/repositories
  16. < -rw-r--r-- 12 etc/apk/world
  17. ---
  18. > -rw-r--r-- 95 etc/apk/repositories
  19. > -rw-r--r-- 51 etc/apk/world
  20. 108,129d101
  21. < -rw-r--r-- 328 etc/conf.d/bootmisc
  22. < -rw-r--r-- 876 etc/conf.d/consolefont
  23. < -rw-r--r-- 55 etc/conf.d/cron
  24. < -rw-r--r-- 348 etc/conf.d/devfs
  25. < -rw-r--r-- 117 etc/conf.d/dmesg
  26. < -rw-r--r-- 1402 etc/conf.d/fsck
  27. < -rw-r--r-- 59 etc/conf.d/hostname
  28. < -rw-r--r-- 857 etc/conf.d/hwclock
  29. < -rw-r--r-- 911 etc/conf.d/keymaps
  30. < -rw-r--r-- 105 etc/conf.d/killprocs
  31. < -rw-r--r-- 14 etc/conf.d/klogd
  32. < -rw-r--r-- 121 etc/conf.d/localmount
  33. < -rw-r--r-- 124 etc/conf.d/modloop
  34. < -rw-r--r-- 898 etc/conf.d/modules
  35. < -rw-r--r-- 1335 etc/conf.d/netmount
  36. < -rw-r--r-- 106 etc/conf.d/ntpd
  37. < -rw-r--r-- 48 etc/conf.d/rdate
  38. < -rw-r--r-- 357 etc/conf.d/staticroute
  39. < -rw-r--r-- 16 etc/conf.d/syslog
  40. < -rw-r--r-- 76 etc/conf.d/tmpfiles
  41. < -rw-r--r-- 282 etc/conf.d/urandom
  42. < -rw-r--r-- 40 etc/conf.d/watchdog
  43. 131c103
  44. < -rw-r--r-- 283 etc/crontabs/root
  45. ---
  46. > -rw------- 283 etc/crontabs/root
  47. 133c105
  48. < -rw-r--r-- 810 etc/group
  49. ---
  50. > -rw-r--r-- 683 etc/group
  51. 137,185c109
  52. [...]

Comparing changes between ubuntu:wily and ubuntu-debootstrap:wily.

  1. $ ./docker-diff ubuntu:wily ubuntu-debootstrap:wily
  2. Unable to find image 'ubuntu:wily' locally
  3. wily: Pulling from library/ubuntu
  4. cde2d46a079b: Pulling fs layer
  5. e189717d7053: Pulling fs layer
  6. 7147b2632305: Pulling fs layer
  7. d8a164f81acc: Pulling fs layer
  8. 7147b2632305: Verifying Checksum
  9. 7147b2632305: Download complete
  10. e189717d7053: Verifying Checksum
  11. e189717d7053: Download complete
  12. d8a164f81acc: Verifying Checksum
  13. d8a164f81acc: Download complete
  14. cde2d46a079b: Verifying Checksum
  15. cde2d46a079b: Download complete
  16. cde2d46a079b: Pull complete
  17. e189717d7053: Pull complete
  18. 7147b2632305: Pull complete
  19. d8a164f81acc: Pull complete
  20. Digest: sha256:f399d4101e8e41196b9bc58a96e63d17e3d5fcef702df2bda05e166dc3b5ac3c
  21. Status: Downloaded newer image for ubuntu:wily
  22. Unable to find image 'ubuntu-debootstrap:wily' locally
  23. wily: Pulling from library/ubuntu-debootstrap
  24. 15b60992a765: Pulling fs layer
  25. 56590e6e34d5: Pulling fs layer
  26. 56590e6e34d5: Verifying Checksum
  27. 56590e6e34d5: Download complete
  28. 15b60992a765: Verifying Checksum
  29. 15b60992a765: Download complete
  30. 15b60992a765: Pull complete
  31. 56590e6e34d5: Pull complete
  32. Digest: sha256:0d464ac0c99ecb124f5cc078b2f3db5e33699d030d90c27164af38a721a2b7f2
  33. Status: Downloaded newer image for ubuntu-debootstrap:wily
  34. ...
  1. 13,14c13,14
  2. < -rwxr-xr-x 101928 bin/df
  3. < -rwxr-xr-x 118272 bin/dir
  4. ---
  5. > -rwxr-xr-x 101960 bin/df
  6. > -rwxr-xr-x 118368 bin/dir
  7. 18c18
  8. < -rwxr-xr-x 31264 bin/echo
  9. ---
  10. > -rwxr-xr-x 31296 bin/echo
  11. 27a28
  12. > -rwxr-xr-x 363680 bin/ip
  13. 33c34
  14. < -rwxr-xr-x 118272 bin/ls
  15. ---
  16. > -rwxr-xr-x 118368 bin/ls
  17. 34a36
  18. > -rwxr-xr-x 474352 bin/machinectl
  19. 42c44
  20. < -rwxr-xr-x 670304 bin/networkctl
  21. ---
  22. > -rwxr-xr-x 670296 bin/networkctl
  23. 44a47,48
  24. > -rwsr-xr-x 70768 bin/ping
  25. > -rwsr-xr-x 61520 bin/ping6
  26. 46c50
  27. < -rwxr-xr-x 31360 bin/pwd
  28. ---
  29. > -rwxr-xr-x 31392 bin/pwd
  30. 50c54
  31. [...]

See full examples.

Sub-project

License

MIT