mirror of
https://github.com/containers/podman.git
synced 2025-05-21 09:05:56 +08:00

Add an exists subcommand to podman container and podman image that allows users to verify the existence of a container or image by ID or name. The return code can be 0 (success), 1 (failed to find), or 125 (failed to work with runtime). Issue #1845 Signed-off-by: baude <bbaude@redhat.com>
16 lines
435 B
Go
16 lines
435 B
Go
package image
|
|
|
|
import (
|
|
"errors"
|
|
)
|
|
|
|
// Copied directly from libpod errors to avoid circular imports
|
|
var (
|
|
// ErrNoSuchCtr indicates the requested container does not exist
|
|
ErrNoSuchCtr = errors.New("no such container")
|
|
// ErrNoSuchPod indicates the requested pod does not exist
|
|
ErrNoSuchPod = errors.New("no such pod")
|
|
// ErrNoSuchImage indicates the requested image does not exist
|
|
ErrNoSuchImage = errors.New("no such image")
|
|
)
|