docker

package
v0.0.0-...-7652b73 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClient

func CreateClient() (*client.Client, error)

Create client

func CreateContainer

func CreateContainer(cli *client.Client, config ContainerConfig) (err error, created bool)

func DeleteContainer

func DeleteContainer(cli *client.Client, containerId string) error

deleteContainers deletes multiple Docker containers by their IDs

func EnsureRunningContainers

func EnsureRunningContainers(cli *client.Client, containerID string) error

func GetContainerIDByName

func GetContainerIDByName(cli *client.Client, containerName string) (string, error)

func ListAllContariners

func ListAllContariners(cli *client.Client) ([]types.Container, error)

Types

type ContainerConfig

type ContainerConfig struct {
	Image        string
	Name         string
	ExposedPorts nat.PortSet
	PortBindings nat.PortMap
	Env          []string
	Cmd          []string
}

Jump to

Keyboard shortcuts

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