Files
podman/cmd/podman/commands.go
Divyansh Kamboj 2a961a7113 Add unshare to podman
This command lets the user run a command in a new user namespace like `unshare -u`.
It uses the implementation of unshare in buildah. ( fixes #1388 )

Signed-off-by: Divyansh Kamboj <kambojdivyansh2000@gmail.com>
2019-05-16 13:38:31 +05:30

84 lines
1.5 KiB
Go

// +build !remoteclient
package main
import (
"github.com/spf13/cobra"
)
const remoteclient = false
// Commands that the local client implements
func getMainCommands() []*cobra.Command {
rootCommands := []*cobra.Command{
_commitCommand,
_execCommand,
_playCommand,
_loginCommand,
_logoutCommand,
_mountCommand,
_refreshCommand,
_searchCommand,
_statsCommand,
_unshareCommand,
}
if len(_varlinkCommand.Use) > 0 {
rootCommands = append(rootCommands, _varlinkCommand)
}
return rootCommands
}
// Commands that the local client implements
func getImageSubCommands() []*cobra.Command {
return []*cobra.Command{
_signCommand,
}
}
// Commands that the local client implements
func getContainerSubCommands() []*cobra.Command {
return []*cobra.Command{
_cleanupCommand,
_commitCommand,
_execCommand,
_mountCommand,
_refreshCommand,
_runlabelCommand,
_statsCommand,
_umountCommand,
}
}
// Commands that the local client implements
func getPlaySubCommands() []*cobra.Command {
return []*cobra.Command{
_playKubeCommand,
}
}
// Commands that the local client implements
func getTrustSubCommands() []*cobra.Command {
return []*cobra.Command{
_setTrustCommand,
_showTrustCommand,
}
}
// Commands that the local client implements
func getSystemSubCommands() []*cobra.Command {
return []*cobra.Command{
_renumberCommand,
_dfSystemCommand,
_migrateCommand,
}
}
// Commands that the local client implements
func getHealthcheckSubCommands() []*cobra.Command {
return []*cobra.Command{
_healthcheckrunCommand,
}
}