podman-container-diff(1)

๐Ÿ’… podman-container-diff(1) โ€” General Commands Manual, but make it cute

okay bestie so this is podman-container-diff, and it's genuinely one of my faves because it lets you spill the tea on what's going on inside a container's filesystem ๐Ÿ‘€โœจ


๐ŸŒธ NAME ๐ŸŒธ

podman-container-diff โ€” inspect changes on a container's filesystem. that's it, that's the vibe ๐Ÿซถ


โœจ SYNOPSIS โœจ

podman container diff [options] container [container]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So here's the deal: this command displays changes on a container's filesystem. iconic. basically it's a glow-up check โœจ

The container gets compared to its parent layer โ€” or, if you're feeling generous and hand over a second argument, it compares against that one instead. two containers, one diff, main character energy fr fr ๐Ÿ’…

Every line of output gets prefixed with a lil symbol so you know exactly what went down. here's the decoder ring ๐Ÿ”ฎ:

  • A โ€” a file or directory was added ๐ŸŽ€ (new drop, we love to see it)
  • D โ€” a file or directory was deleted ๐Ÿ˜ญ (gone, reduced to atoms)
  • C โ€” a file or directory was changed ๐Ÿฆ‹ (glow-up arc, but make it filesystem)

no cap, that's the whole legend. memorise it, it's giving flashcards.


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • --format โ€” alters the output into a different format. and the only valid format for podman container diff is json. that's the whole menu, bestie, don't try anything else ๐Ÿ™ˆ
  • --latest, -l โ€” instead of giving a container name or ID, just use the last created container. lowkey convenient, highkey chaotic. โš ๏ธ Note: the last started container can be from other users of Podman on the host machine. so yeah, it might not be yours. vibe check accordingly ๐Ÿ’€
๐Ÿšจ also important: this option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines. so if that's you, sorry bestie, no --latest for you ๐Ÿ˜ญ

๐ŸŒˆ EXAMPLES ๐ŸŒˆ

first up, the classic โ€” diff a container against its parent layer:

# podman container diff container1
C /usr
C /usr/local
C /usr/local/bin
A /usr/local/bin/docker-entrypoint.sh

look at that. docker-entrypoint.sh was added, everything else just changed. slay ๐ŸŽ€


now let's get fancy and diff two containers with json output:

$ podman container diff --format json container1 container2
{
     "added": [
          "/test"
     ]
}

clean. structured. json-pilled. "/test" was added and the output is obsessed with telling you about it โœจ


and finally, the --latest shortcut:

$ podman container diff --latest
C /etc

just C /etc. something in /etc changed. mysterious. iconic. we move ๐Ÿ’…


๐Ÿ’– SEE ALSO ๐Ÿ’–

go read those too, they're the supporting cast and they ate ๐Ÿซถ


๐Ÿ“œ HISTORY ๐Ÿ“œ

July 2021 โ€” originally compiled by Paul Holzinger <pholzing@redhat.com> ๐Ÿ’Œ


and that's the whole page, bestie!! ๐ŸŒธ thanks for reading, go diff something and feel powerful ๐Ÿฆ‹

podman-container-diff(1) โ€” part of the General Commands Manual, dated July 2021. that's the source and the version and the date all wrapped up in a lil bow ๐ŸŽ€ mwah, bye!! ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from