context

package
v24.0.0-rc.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 23 Imported by: 64

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContextCommand

func NewContextCommand(dockerCli command.Cli) *cobra.Command

NewContextCommand returns the context cli subcommand

func RunCreate

func RunCreate(cli command.Cli, o *CreateOptions) error

RunCreate creates a Docker context

func RunExport

func RunExport(dockerCli command.Cli, opts *ExportOptions) error

RunExport exports a Docker context

func RunImport

func RunImport(dockerCli command.Cli, name string, source string) error

RunImport imports a Docker context

func RunRemove

func RunRemove(dockerCli command.Cli, opts RemoveOptions, names []string) error

RunRemove removes one or more contexts

func RunUpdate

func RunUpdate(cli command.Cli, o *UpdateOptions) error

RunUpdate updates a Docker context

func RunUse

func RunUse(dockerCli command.Cli, name string) error

RunUse set the current Docker context

Types

type CreateOptions

type CreateOptions struct {
	Name        string
	Description string
	Docker      map[string]string
	From        string
}

CreateOptions are the options used for creating a context

type ExportOptions

type ExportOptions struct {
	ContextName string
	Dest        string
}

ExportOptions are the options used for exporting a context

type RemoveOptions

type RemoveOptions struct {
	Force bool
}

RemoveOptions are the options used to remove contexts

type UpdateOptions

type UpdateOptions struct {
	Name        string
	Description string
	Docker      map[string]string
}

UpdateOptions are the options used to update a context

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL