docker

package
v0.0.0-...-8abe587 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerEventData

type ContainerEventData struct {
	ID       string
	Name     string
	Image    string
	Status   string
	ExitCode string
}

type Docker

type Docker struct {
	// contains filtered or unexported fields
}

func (*Docker) ContainerCreateAndStart

func (d *Docker) ContainerCreateAndStart(imageName, user, containerName, restart, ip string, ports, volumes, environment, commands []string) (string, []string, error)

create a docker container and directly start it

func (*Docker) ContainerEvents

func (d *Docker) ContainerEvents(eve chan<- ContainerEventData) ContainerEventData

func (*Docker) ContainerRunning

func (d *Docker) ContainerRunning(containerName string) (bool, string)

checks if a container is running return bool --> true: container is running, false container is stopped return *string --> "": container not found, id of the cointainer if it was found

func (*Docker) Enabled

func (d *Docker) Enabled() bool

func (*Docker) ImageExists

func (d *Docker) ImageExists(imageName string) bool

function that checks if an image exists

func (*Docker) Init

func (d *Docker) Init(networkId, networkSubnet string, networkGateway string) error

func (*Docker) NetworkCreate

func (d *Docker) NetworkCreate(id, subnet string) (string, string, error)

func (*Docker) PullImage

func (d *Docker) PullImage(imageName string)

Jump to

Keyboard shortcuts

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