Documentation
¶
Index ¶
- func AutocompleteRun(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func EnsureStopContainer(ctx context.Context, name, containerID string, volumes []string, ...)
- func ReadContainerID(ctx context.Context, cidFile string) (containerID string, err error)
- type Flags
- func (f *Flags) AddFlags(flagSet *pflag.FlagSet, what string)
- func (f *Flags) AdjustImageIndex(adjust int)
- func (f *Flags) GetContainerNameAndArgs(defaultContainerName string) (string, []string, error)
- func (f *Flags) PullOrBuildImage(ctx context.Context) error
- func (f *Flags) Validate(args []string) error
- type Mount
- type Network
- type PublishedPort
- type PublishedPorts
- type RunFlags
- type Runner
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutocompleteRun ¶
func EnsureStopContainer ¶
func ReadContainerID ¶
ReadContainerID reads the containerID that docker run --cidfile <cidfils> writes to a file, and then removes the file. It returns fs.ErrNotExist if no such file has been produced within 200 ms.
Types ¶
type Flags ¶
type Flags struct { Run bool // --docker-run Debug bool // set if --docker-debug was used BuildOptions []string // --docker-build-opt key=value, // Optional flag to docker build can be repeated (but not comma separated) Context string // Set to build or debug by Validate function Image string Mount string // --docker-mount // where to mount in a docker container. Defaults to mount unless mount is "true" or "false". // contains filtered or unexported fields }
func (*Flags) AdjustImageIndex ¶ added in v2.23.0
func (*Flags) GetContainerNameAndArgs ¶
func (*Flags) PullOrBuildImage ¶
PullOrBuildImage will pull or build the image and return the args list suitable when starting it.
type PublishedPort ¶
func (PublishedPort) String ¶
func (c PublishedPort) String() string
type PublishedPorts ¶
type PublishedPorts []PublishedPort
func (*PublishedPorts) Append ¶
func (p *PublishedPorts) Append(s string) error
func (*PublishedPorts) GetSlice ¶
func (p *PublishedPorts) GetSlice() []string
func (*PublishedPorts) Replace ¶
func (p *PublishedPorts) Replace(vals []string) error
func (*PublishedPorts) Set ¶
func (p *PublishedPorts) Set(s string) error
func (*PublishedPorts) String ¶
func (p *PublishedPorts) String() string
func (*PublishedPorts) Type ¶
func (p *PublishedPorts) Type() string
Click to show internal directories.
Click to hide internal directories.