mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-26 18:27:53 +00: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>
34 lines
665 B
Go
34 lines
665 B
Go
package main
|
|
|
|
import (
|
|
"github.com/urfave/cli"
|
|
)
|
|
|
|
var (
|
|
imageSubCommands = []cli.Command{
|
|
buildCommand,
|
|
historyCommand,
|
|
importCommand,
|
|
imageExistsCommand,
|
|
inspectCommand,
|
|
loadCommand,
|
|
lsImagesCommand,
|
|
// pruneCommand,
|
|
pullCommand,
|
|
pushCommand,
|
|
rmImageCommand,
|
|
saveCommand,
|
|
tagCommand,
|
|
}
|
|
|
|
imageDescription = "Manage images"
|
|
imageCommand = cli.Command{
|
|
Name: "image",
|
|
Usage: "Manage images",
|
|
Description: imageDescription,
|
|
ArgsUsage: "",
|
|
Subcommands: imageSubCommands,
|
|
UseShortOptionHandling: true,
|
|
OnUsageError: usageErrorHandler,
|
|
}
|
|
)
|