From 3508bd22fe355630453d497d905e480974a84b96 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 9 Sep 2022 09:06:18 -0400 Subject: Add support for podman context as alias to podman system connection Alias podman --context -> podman --connection podman context use -> podman system connection default podman context rm -> podman system connection rm podman context create -> podman system connection add podman context ls ->podman system connection ls podman context inspect ->podman system connection ls --json (For specified connections) Podman context is a hidden command, but can be used for existing scripts that assume Docker under the covers. Signed-off-by: Daniel J Walsh --- cmd/podman/system/connection/remove.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cmd/podman/system/connection/remove.go') diff --git a/cmd/podman/system/connection/remove.go b/cmd/podman/system/connection/remove.go index 29bf98c43..5ff0000d6 100644 --- a/cmd/podman/system/connection/remove.go +++ b/cmd/podman/system/connection/remove.go @@ -29,6 +29,11 @@ var ( ) func init() { + registry.Commands = append(registry.Commands, registry.CliCommand{ + Command: rmCmd, + Parent: system.ContextCmd, + }) + registry.Commands = append(registry.Commands, registry.CliCommand{ Command: rmCmd, Parent: system.ConnectionCmd, @@ -36,6 +41,9 @@ func init() { flags := rmCmd.Flags() flags.BoolVarP(&rmOpts.All, "all", "a", false, "Remove all connections") + + flags.BoolP("force", "f", false, "Ignored: for Docker compatibility") + _ = flags.MarkHidden("force") } func rm(cmd *cobra.Command, args []string) error { -- cgit v1.2.3-54-g00ecf