docker

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CgroupNoneDriver = "none"
)

Variables

This section is empty.

Functions

func DefaultMounts

func DefaultMounts() []mount.Mount

func GenerateSubnetFromName

func GenerateSubnetFromName(name string, attempt int32) string

func NewDockerProvider

func NewDockerProvider() (client.ProviderService, error)

Types

type Provider

type Provider struct {
	DockerClient *dc.Client
	Ctx          context.Context
}

func (*Provider) DeleteImageResource

func (p *Provider) DeleteImageResource(imageID string) error

func (*Provider) DeleteNetworkResource

func (p *Provider) DeleteNetworkResource(id string) error

func (*Provider) GetContainerIDByIP

func (p *Provider) GetContainerIDByIP(containerIP string, networkName string) (string, error)

func (*Provider) GetContainerInfo

func (p *Provider) GetContainerInfo(containerID string, networkName string) (*client.Container, error)

func (*Provider) GetImageIDByName

func (p *Provider) GetImageIDByName(name string) string

func (*Provider) GetImageResourceByID

func (p *Provider) GetImageResourceByID(id string) (*types.ImageInspect, error)

func (*Provider) GetNetworkResourceByID

func (p *Provider) GetNetworkResourceByID(id string) (*types.NetworkResource, error)

func (*Provider) GetServerInfo

func (p *Provider) GetServerInfo() (*client.DockerInfo, error)

func (*Provider) PrepareNetworkResource

func (p *Provider) PrepareNetworkResource(networkName string) (string, error)

func (*Provider) PullImage

func (p *Provider) PullImage(imageName string) (string, error)

func (*Provider) RmContainer

func (p *Provider) RmContainer(containerID string) error

func (*Provider) RunContainer

func (p *Provider) RunContainer(opts *client.CreateOptsForContainer) (string, error)

Jump to

Keyboard shortcuts

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