Documentation ¶
Index ¶
Constants ¶
View Source
const ( Name = "install" Usage = "Installs slim" Alias = "in" )
View Source
const ( FlagBinDir = "bin-dir" FlagBinDirUsage = "Install binaries to the standard user app bin directory (/usr/local/bin)" FlagDockerCLIPlugin = "docker-cli-plugin" FlagDockerCLIPluginUsage = "Install as Docker CLI plugin" )
Variables ¶
View Source
var CLI = &cli.Command{ Name: Name, Aliases: []string{Alias}, Usage: Usage, Flags: []cli.Flag{ &cli.BoolFlag{ Name: FlagBinDir, Usage: FlagBinDirUsage, EnvVars: []string{"DSLIM_INSTALL_BIN_DIR"}, }, &cli.BoolFlag{ Name: FlagDockerCLIPlugin, Usage: FlagDockerCLIPluginUsage, EnvVars: []string{"DSLIM_INSTALL_DOCKER_CLI_PLUGIN"}, }, }, Action: func(ctx *cli.Context) error { doDebug := ctx.Bool(command.FlagDebug) statePath := ctx.String(command.FlagStatePath) inContainer, isDSImage := command.IsInContainer(ctx.Bool(command.FlagInContainer)) archiveState := command.ArchiveState(ctx.String(command.FlagArchiveState), inContainer) binDir := ctx.Bool(FlagBinDir) dockerCLIPlugin := ctx.Bool(FlagDockerCLIPlugin) OnCommand(doDebug, statePath, archiveState, inContainer, isDSImage, binDir, dockerCLIPlugin) return nil }, }
View Source
var CommandFlagSuggestions = &command.FlagSuggestions{ Names: []prompt.Suggest{ {Text: command.FullFlagName(FlagDockerCLIPlugin), Description: FlagDockerCLIPluginUsage}, }, Values: map[string]command.CompleteValue{ command.FullFlagName(FlagDockerCLIPlugin): command.CompleteBool, }, }
View Source
var CommandSuggestion = prompt.Suggest{ Text: Name, Description: Usage, }
Functions ¶
func OnCommand ¶
func OnCommand( doDebug bool, statePath string, archiveState string, inContainer bool, isDSImage bool, binDir bool, dockerCLIPlugin bool)
OnCommand implements the 'install' command
func RegisterCommand ¶
func RegisterCommand()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.