podman-container-exists(1)

πŸ“¦
version 6.1.4 Β· 5 versions
, in arch rolling, fedora 43, fedora 44, ubuntu resolute

πŸ’– podman-container-exists(1) β€” the "does my container even exist tho" check πŸ’–

okay bestie, so this one lives in the General Commands Manual section, and it's literally the most low-stakes, high-value little command. sit down, we're doing a vibe check on your local storage. ✨


🌸 NAME 🌸

podman-container-exists β€” check if a container exists in local storage. that's it. that's the whole job. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

podman container exists [options] container

✨ DESCRIPTION ✨

so here's the tea: podman container exists checks if a container exists in local storage. you feed it a container ID or a name, and it goes looking. πŸ‘€

the way it talks back to you is through exit codes, iykyk:

  • 0 β€” found it, slay, the container is there πŸ’…
  • 1 β€” nope, not found
  • 125 β€” uh oh, there was an issue accessing the local storage 😭
fr fr, exit codes are the whole language here. no cute output message, just a number. read it and weep (or celebrate).

πŸ’… OPTIONS πŸ’…

  • --external β€” check for external containers as well as Podman containers. these external containers are generally created via other container technology, like Buildah or CRI-O. the default is false. πŸ’œ
  • -h, --help β€” prints the usage statement. the default is false. 🫢

🌈 EXAMPLES 🌈

1. check if a container called webclient exists in local storage. here, the container does exist. πŸ‘‘

$ podman container exists webclient
$ echo $?
0

2. check if a container called webbackend exists in local storage. here, the container does not exist. πŸ’€

$ podman container exists webbackend
$ echo $?
1

3. check if a container called ubi8-working-container, created via Buildah, exists in local storage. here, the container does not exist. πŸ™ˆ

$ podman container exists --external ubi8-working-container
$ echo $?
1

πŸŽ€ SEE ALSO πŸŽ€


πŸ“œ HISTORY πŸ“œ

November 2018 β€” originally compiled by Brent Baude bbaude@redhat.com ⟨mailto:bbaude@redhat.com⟩. iconic behavior, honestly. 🌟


okay that's the whole page bestie, thanks for coming to my ted talk. this was podman-container-exists(1) from the General Commands Manual, and it's been giving November 2018 energy since, well, November 2018. πŸ¦‹ bye pookie, go check if your containers exist πŸ’–βœ¨

πŸ“¦ where this page comes from