Documentation ¶
Index ¶
- Constants
- func SetAPIVersion()
- func VerifyNetwork(ctx context.Context, cli *client.Client, name string) error
- type Docker
- func (d *Docker) Create(containerConfig *container.Config, hostConfig *container.HostConfig, ...) (string, error)
- func (d *Docker) Exec(containerName string, execConfig types.ExecConfig) error
- func (d *Docker) ImageExists(name string) bool
- func (d *Docker) Inspect(id string) (types.ContainerJSON, error)
- func (d *Docker) List(args filters.Args) ([]types.Container, error)
- func (d *Docker) PullImage(image string) error
- func (d *Docker) Remove(id string) error
- func (d *Docker) Search(name string) (types.Container, error)
- func (d *Docker) Start(id, name string) error
- func (d *Docker) Stop(id, name string) error
- type Engine
- func (e Engine) Create(spec vm.Instance) (id string, err error)
- func (e Engine) Delete(namespace, id string) error
- func (e *Engine) Init()
- func (e Engine) List(namespace string, all bool) ([]vm.Instance, error)
- func (e *Engine) SSHVM(namespace, id, user, key string, term *termutil.Terminal) error
- func (e Engine) Save(namespace, id, outputFile string, stopVM bool) error
- func (e Engine) Start(namespace, id string) error
- func (e Engine) Stop(namespace, id string) error
- type Network
Constants ¶
View Source
const ( VMLauncherContainerImage = "docker.io/govm/govm:latest" VNCContainerImage = "govm/novnc-server" )
Container Images
View Source
const (
VNCServerContainerName = "vm-launcher-novnc-server"
)
Default VM Launcher containers' names
Variables ¶
This section is empty.
Functions ¶
func SetAPIVersion ¶
func SetAPIVersion()
SetAPIVersion gets local docker server API version. nolint: godox TODO: Investigate how we can replace the exec.Command approach
Types ¶
type Docker ¶
Docker stands as a docker service client.
func NewDockerClient ¶
func NewDockerClient() *Docker
NewDockerClient returns a new Docker service client.
func (*Docker) Create ¶
func (d *Docker) Create(containerConfig *container.Config, hostConfig *container.HostConfig, networkConfig *network.NetworkingConfig, name string) (string, error)
Create creates a new docker container
func (*Docker) Exec ¶
func (d *Docker) Exec(containerName string, execConfig types.ExecConfig) error
Exec executes commands inside a running container
func (*Docker) ImageExists ¶
ImageExists verifies that an image exists in the local docker registry
func (*Docker) Inspect ¶
func (d *Docker) Inspect(id string) (types.ContainerJSON, error)
Inspect inspects and return details about an specific container.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine stands an entry point for the docker container services nolint: typecheck
func (*Engine) Init ¶
func (e *Engine) Init()
Init initializes a the Engine's docker client nolint: typecheck
Click to show internal directories.
Click to hide internal directories.