.nh .TH podman\-container\-exists(1) .SH NAME .PP podman\-container\-exists \- Check if a container exists in local storage .SH SYNOPSIS .PP \fBpodman container exists\fP [\fIoptions\fP] \fIcontainer\fP .SH DESCRIPTION .PP \fBpodman container exists\fP checks if a container exists in local storage. The \fBID\fP or \fBName\fP of the container may be used as input. Podman will return an exit code of \fB\fC0\fR when the container is found. A \fB\fC1\fR will be returned otherwise. An exit code of \fB\fC125\fR indicates there was an issue accessing the local storage. .SH OPTIONS .SS \fB\-\-external\fP=\fItrue|false\fP .PP 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. .PP \fB\-h\fP, \fB\-\-help\fP Print usage statement .SH EXAMPLES .PP Check if an container called \fB\fCwebclient\fR exists in local storage (the container does actually exist). .PP .RS .nf $ podman container exists webclient $ echo $? 0 .fi .RE .PP Check if an container called \fB\fCwebbackend\fR exists in local storage (the container does not actually exist). .PP .RS .nf $ podman container exists webbackend $ echo $? 1 .fi .RE .PP Check if an container called \fB\fCubi8\-working\-container\fR created via Buildah exists in local storage (the container does not actually exist). .PP .RS .nf $ podman container exists \-\-external ubi8\-working\-container $ echo $? 1 .fi .RE .SH SEE ALSO .PP podman(1) .SH HISTORY .PP November 2018, Originally compiled by Brent Baude (bbaude at redhat dot com)