Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rmi1974/61c97f8d5fbb1cc953edcd84518041cb to your computer and use it in GitHub Desktop.
Save rmi1974/61c97f8d5fbb1cc953edcd84518041cb to your computer and use it in GitHub Desktop.
How to show differences between two Docker images #commandlinefu #docker #diff #compare #images

How to show differences between two Docker images

Courtesy of github container-diff

Prerequisite:

$ cd Downloads
$ curl -LO https://storage.googleapis.com/container-diff/latest/container-diff-linux-amd64

# local registered PATH
$ mv container-diff-linux-amd64 ~/.local/bin/container-diff

Note: As stated in documentation, container-diff does not support references images by Docker ID directly.

When being pulled via 'latest', local images might not be tagged. Hence create a docker tag on the desired image before comparison:

$ docker image ls
...
$ docker tag 003837a63fa7 lscr.io/linuxserver/heimdall:old

Compare images from locally running Docker daemon:

$ container-diff diff daemon://lscr.io/linuxserver/heimdall:latest \
                      daemon://lscr.io/linuxserver/heimdall:old --type=file

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment