github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-container-exists.1.md (about) 1 % podman-container-exists 1 2 3 ## NAME 4 podman\-container\-exists - Check if a container exists in local storage 5 6 ## SYNOPSIS 7 **podman container exists** [*options*] *container* 8 9 ## DESCRIPTION 10 **podman container exists** checks if a container exists in local storage. The *container ID* or *name* is used as input. Podman returns an exit code 11 of `0` when the container is found. A `1` is returned otherwise. An exit code of `125` indicates there was an issue accessing the local storage. 12 13 ## OPTIONS 14 #### **--external** 15 16 Check for external *containers* as well as Podman *containers*. These external *containers* are generally created via other container technology such as `Buildah` or `CRI-O`.\ 17 The default is **false**. 18 19 **-h**, **--help** 20 21 Prints usage statement.\ 22 The default is **false**. 23 24 ## EXAMPLES 25 26 Check if a container called "webclient" exists in local storage. Here, the container does exist. 27 ``` 28 $ podman container exists webclient 29 $ echo $? 30 0 31 ``` 32 33 Check if a container called "webbackend" exists in local storage. Here, the container does not exist. 34 ``` 35 $ podman container exists webbackend 36 $ echo $? 37 1 38 ``` 39 40 Check if a container called "ubi8-working-container" created via Buildah exists in local storage. Here, the container does not exist. 41 ``` 42 $ podman container exists --external ubi8-working-container 43 $ echo $? 44 1 45 ``` 46 47 ## SEE ALSO 48 **[podman(1)](podman.1.md)** 49 50 ## HISTORY 51 November 2018, Originally compiled by Brent Baude <bbaude@redhat.com>