dev

package
v2.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT, Apache-2.0 Imports: 72 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PullImageAlways  = "always"
	PullImageMissing = "missing" // Default (matches previous behavior)
	PullImageNever   = "never"
)

Pull constants

Variables

This section is empty.

Functions

func AddDockerFlags added in v2.2.5

func AddDockerFlags(options *Options, p *pflag.FlagSet, cli *command.DockerCli)

func DoDev

func DoDev(ctx context.Context, option *Options, conf *util.SshConfig, flags *pflag.FlagSet, f util2.Factory, transferImage bool) error

func ForwardAllSignals added in v2.2.5

func ForwardAllSignals(ctx context.Context, apiClient client.ContainerAPIClient, cid string, sigc <-chan os.Signal)

ForwardAllSignals forwards signals to the container

The channel you pass in must already be setup to receive any signals you want to forward.

func MonitorTtySize added in v2.2.5

func MonitorTtySize(ctx context.Context, cli command.Cli, id string, isExec bool) error

MonitorTtySize updates the container tty size when the terminal tty changes size

func NewCreateCommand added in v2.2.5

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

NewCreateCommand creates a new cobra.Command for `docker create`

func NewRunCommand added in v2.2.5

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

NewRunCommand create a new `docker run` command

Types

type ConfigList

type ConfigList []*RunConfig

func (ConfigList) Remove

func (c ConfigList) Remove(ctx context.Context, cli *client.Client) error

func (ConfigList) Run

func (c ConfigList) Run(ctx context.Context, volume map[string][]mount.Mount, cli *client.Client, dockerCli *command.DockerCli) error

type ConnectMode

type ConnectMode string
const (
	ConnectModeContainer ConnectMode = "container"
	ConnectModeHost      ConnectMode = "host"
)

type Options

type Options struct {
	Headers        map[string]string
	Namespace      string
	Workload       string
	Factory        cmdutil.Factory
	ContainerName  string
	NoProxy        bool
	ExtraRouteInfo handler.ExtraRouteInfo
	ConnectMode    ConnectMode
	Engine         config.Engine

	// docker options
	DevImage string
	Options  runOptions
	Copts    *containerOptions

	// inner
	Cli       *client.Client
	DockerCli *command.DockerCli
	// contains filtered or unexported fields
}

func (*Options) AddRollbackFunc

func (option *Options) AddRollbackFunc(f func() error)

func (*Options) GetExposePort added in v2.2.5

func (option *Options) GetExposePort(containerCfg *containerConfig) (nat.PortMap, nat.PortSet, error)

func (*Options) GetRollbackFuncList

func (option *Options) GetRollbackFuncList() []func() error

func (*Options) Main

func (option *Options) Main(ctx context.Context, c *containerConfig) error

type RunConfig

type RunConfig struct {
	Options runOptions
	Copts   *containerOptions
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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