github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/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 **ID** or **Name** 11 of the container may be used as input. Podman will return an exit code 12 of `0` when the container is found. A `1` will be returned otherwise. An exit code of `125` indicates there 13 was an issue accessing the local storage. 14 15 ## OPTIONS 16 17 #### **--external**=*true|false* 18 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. 19 20 **-h**, **--help** 21 Print usage statement 22 23 ## EXAMPLES 24 25 Check if an container called `webclient` exists in local storage (the container does actually exist). 26 ``` 27 $ podman container exists webclient 28 $ echo $? 29 0 30 ``` 31 32 Check if an container called `webbackend` exists in local storage (the container does not actually exist). 33 ``` 34 $ podman container exists webbackend 35 $ echo $? 36 1 37 ``` 38 39 Check if an container called `ubi8-working-container` created via Buildah exists in local storage (the container does not actually exist). 40 ``` 41 $ podman container exists --external ubi8-working-container 42 $ echo $? 43 1 44 ``` 45 46 ## SEE ALSO 47 podman(1) 48 49 ## HISTORY 50 November 2018, Originally compiled by Brent Baude (bbaude at redhat dot com)