podman-diff(1)

๐Ÿ‘‘ NAME ๐Ÿ‘‘

podman-diff โ€” the iconic little tool that lets you snoop on what changed inside a container or image's filesystem ๐Ÿ’… (this is the podman-diff(1) page from the General Commands Manual, bestie, section 1, we're fancy here โœจ)


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

podman diff [options] container|image [container|image]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

Okay so podman diff shows you all the changes on a container or an image's filesystem. The container or image gets compared to its parent layer โ€” OR, if you're feeling extra and passed a second argument, it compares against that second argument instead. main character energy, honestly ๐Ÿซถ

Every line of output gets a lil symbol prefix, and here's the decoder ring ๐Ÿ”ฎ:

  • A โ€” a file or directory was added โœจ
  • D โ€” a file or directory was deleted ๐Ÿ’€
  • C โ€” a file or directory was changed ๐ŸŒ€

๐Ÿ’– OPTIONS ๐Ÿ’–

๐ŸŽ€ --format

Changes up the output into a different format. The only valid format for podman diff is json. That's it, that's the whole list, no cap ๐Ÿ™ˆ

๐ŸŽ€ --latest, -l

Instead of handing over a container name or ID, this just grabs the last created container. So convenient, so lazy, obsessed ๐Ÿ˜Œ

โš ๏ธ Real talk though: the last started container can be from other users of Podman on the host machine. So like, don't assume it's yours, bestie ๐Ÿ˜ญ ๐Ÿšซ Also: this option is not available with the remote Podman client, including Mac and Windows machines (excluding WSL2). WSL2 girlies, you're fine ๐Ÿ’œ

๐Ÿ“ EXAMPLES ๐Ÿ“

Show container-modified files versus the container's image:

$ podman diff container1
A /myscript.sh

Show container-modified files versus the container's image in JSON format:

$ podman diff --format json myimage
{
  "changed": [
    "/usr",
    "/usr/local",
    "/usr/local/bin"
  ],
  "added": [
    "/usr/local/bin/docker-entrypoint.sh"
  ]
}

Show the difference between the specified container and the image:

$ podman diff container1 image1
A /test

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

go read those next, they're all part of the same friend group ๐Ÿซถโœจ


๐Ÿงš HISTORY ๐Ÿงš

August 2017, originally compiled by Ryan Cole rycole@redhat.com โŸจmailto:rycole@redhat.comโŸฉ ๐ŸŽ€


and that's the whole podman-diff(1) page, bestie!! from the General Commands Manual, all the way back in August 2017, and it's still serving ๐Ÿ’…โœจ slay, bye!! ๐Ÿ’–

๐Ÿ“ฆ where this page comes from