docker

package
v0.0.0-...-188a891 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHostConfig

func CreateHostConfig(params CreateContainerParams) *container.HostConfig

Types

type CreateContainerParams

type CreateContainerParams struct {
	ImageName     string
	Cmd           []string
	NetworkName   string
	Ports         []int
	NetworkAlias  string
	ContainerName string
	Gpus          string
	Envs          []string
	Volumes       []string
}

type DockerCli

type DockerCli struct {
	Cli *client.Client
	Ctx context.Context
}

func (*DockerCli) CheckOrPullImage

func (d *DockerCli) CheckOrPullImage(imageName string)

func (*DockerCli) CreateContainer

func (d *DockerCli) CreateContainer(params CreateContainerParams) (string, error)

func (*DockerCli) GetContainerInfo

func (d *DockerCli) GetContainerInfo(containerId string) (types.ContainerJSON, error)

func (*DockerCli) GetContainerStatus

func (d *DockerCli) GetContainerStatus(containerId string) (string, error)

func (*DockerCli) StopContainer

func (d *DockerCli) StopContainer(containerId string) error

Jump to

Keyboard shortcuts

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