docker

package
v0.0.136 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: GPL-3.0 Imports: 40 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerGet

func DockerGet(containerName string) (types.Container, error)

func DockerInspect

func DockerInspect(DockerID string) (types.ContainerJSON, error)

func Event

func GetAuth

func GetAuth(image string, environment *configuration.Environment) string

func IsDaemonRunning added in v0.0.57

func IsDaemonRunning()

Types

type Docker

type Docker struct {
	DockerID      string
	DockerState   string
	Name          string
	GeneratedName string
	Labels        *smaps.Smap
	Group         string
	Image         string
	Tag           string
	Replicas      uint64
	Configuration *smaps.Smap
	Lock          sync.RWMutex `json:"-"`
	Env           []string
	Entrypoint    []string
	Args          []string
	Privileged    bool
	NetworkMode   string
	Networks      *internal.Networks
	Ports         *internal.Ports
	Volumes       *internal.Volumes
	Readiness     *internal.Readinesses
	Resources     *internal.Resources
	Capabilities  []string
	Definition    v1.ContainerDefinition
	Auth          string
}

func New

func New(name string, config *configuration.Configuration, definition contracts.IDefinition) (*Docker, error)

func (*Docker) AttachToNetworks

func (container *Docker) AttachToNetworks(agentContainerName string) error

func (*Docker) BuildNetwork

func (container *Docker) BuildNetwork() *TDNetwork.NetworkingConfig

func (*Docker) CheckIfImagePresent

func (container *Docker) CheckIfImagePresent(ctx context.Context, cli *client.Client) error

func (*Docker) Delete

func (container *Docker) Delete() error

func (*Docker) Exec

func (container *Docker) Exec(command []string) (types.ExecResult, error)

func (*Docker) GenerateLabels

func (container *Docker) GenerateLabels() map[string]string

func (*Docker) Get

func (container *Docker) Get() (*TDTypes.Container, error)

func (*Docker) GetContainerState added in v0.0.107

func (container *Docker) GetContainerState() (string, error)

func (*Docker) GetDefinition

func (container *Docker) GetDefinition() contracts.IDefinition

func (*Docker) GetDockerAuth

func (container *Docker) GetDockerAuth() image.PullOptions

func (*Docker) GetDomain

func (container *Docker) GetDomain(network string) string

func (*Docker) GetGeneratedName

func (container *Docker) GetGeneratedName() string

func (*Docker) GetGroup

func (container *Docker) GetGroup() string

func (*Docker) GetGroupIdentifier

func (container *Docker) GetGroupIdentifier() string

func (*Docker) GetHeadlessDomain

func (container *Docker) GetHeadlessDomain(network string) string

func (*Docker) GetId added in v0.0.114

func (container *Docker) GetId() string

func (*Docker) GetName

func (container *Docker) GetName() string

func (*Docker) GetNetworkInfoTS

func (container *Docker) GetNetworkInfoTS() *internal.Networks

func (*Docker) Kill added in v0.0.94

func (container *Docker) Kill(signal string) error

func (*Docker) Logs added in v0.0.114

func (container *Docker) Logs(follow bool) (io.ReadCloser, error)

func (*Docker) Prepare

func (container *Docker) Prepare(client *client.Http, user *authentication.User, runtime *types.Runtime) error

func (*Docker) PrepareConfiguration

func (container *Docker) PrepareConfiguration(client *client.Http, user *authentication.User, runtime *types.Runtime) error

func (*Docker) PrepareEnvs

func (container *Docker) PrepareEnvs(runtime *types.Runtime)

func (*Docker) PrepareLabels

func (container *Docker) PrepareLabels(runtime *types.Runtime)

func (*Docker) PrepareNetwork

func (container *Docker) PrepareNetwork(client *client.Http, user *authentication.User, runtime *types.Runtime) error

func (*Docker) PrepareReadiness

func (container *Docker) PrepareReadiness(runtime *types.Runtime)

func (*Docker) PrepareResources

func (container *Docker) PrepareResources(client *client.Http, user *authentication.User, runtime *types.Runtime) error

func (*Docker) PullImage

func (container *Docker) PullImage(ctx context.Context, cli *client.Client) error

func (*Docker) RemoveDns added in v0.0.114

func (container *Docker) RemoveDns(dnsCache *dns.Records, networkId string) error

func (*Docker) RemoveNetworkInfoTS

func (container *Docker) RemoveNetworkInfoTS(containerId string, networkId string, ipAddress string, networkName string) error

func (*Docker) Rename

func (container *Docker) Rename(newName string) error

func (*Docker) Restart

func (container *Docker) Restart() error

func (*Docker) Run

func (container *Docker) Run(config *configuration.Configuration, client *client.Http, dnsCache *dns.Records, user *authentication.User) (*TDTypes.Container, error)

func (*Docker) Start

func (container *Docker) Start() error

func (*Docker) Stop

func (container *Docker) Stop(signal string) error

func (*Docker) SyncNetworkInformation

func (container *Docker) SyncNetworkInformation() error

func (*Docker) ToJson added in v0.0.102

func (container *Docker) ToJson() ([]byte, error)

func (*Docker) UpdateDns

func (container *Docker) UpdateDns(dnsCache *dns.Records) error

func (*Docker) UpdateNetworkInfoTS

func (container *Docker) UpdateNetworkInfoTS(networkId string, ipAddress string, networkName string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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