docker

package
v0.0.0-...-d5d28b9 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient() *client.Client

Get an instance of the Docker struct

Types

type Container

type Container struct {
	Names    []string
	Image    string
	ID       string
	Created  int64
	Status   string
	State    string
	SizeRaw  int64
	SizeRoot int64
	Ports    []types.Port
}

Struct with all data of a Docker container

func GetContainers

func GetContainers(showAll bool) []Container

Get current running Docker containers Returns an array of the []Container

func (Container) Attach

func (c Container) Attach()

func (Container) IsRunning

func (c Container) IsRunning() bool

func (Container) Pause

func (c Container) Pause()

func (Container) Remove

func (c Container) Remove()

func (Container) Rename

func (c Container) Rename(name string)

func (Container) Restart

func (c Container) Restart()

func (Container) Resume

func (c Container) Resume()

func (Container) Start

func (c Container) Start()

func (Container) Stop

func (c Container) Stop()

c.Stop()

Jump to

Keyboard shortcuts

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