docker

package
v0.0.55 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: GPL-3.0 Imports: 34 Imported by: 2

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 Event(event DTEvents.Message) (string, string, bool, string)

func GetAuth

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

Types

type Docker

type Docker struct {
	DockerID               string
	DockerState            string
	Name                   string
	GeneratedName          string
	GeneratedNameNoProject string
	Labels                 map[string]string
	Group                  string
	Image                  string
	Tag                    string
	Replicas               int
	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 *v1.ContainerDefinition) (*Docker, error)

func (*Docker) AttachToNetworks

func (container *Docker) AttachToNetworks() error

func (*Docker) BuildNetwork

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

func (*Docker) CheckIfImagePresent

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

func (*Docker) Delete

func (container *Docker) Delete(runtime *types.Runtime) error

func (*Docker) Exec

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

func (*Docker) GenerateLabels

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

func (*Docker) Get

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

func (*Docker) GetDefinition

func (container *Docker) GetDefinition() v1.ContainerDefinition

func (*Docker) GetDockerAuth

func (container *Docker) GetDockerAuth() types.ImagePullOptions

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) GetName

func (container *Docker) GetName() string

func (*Docker) GetNetworkInfoTS

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

func (*Docker) HasDependencyOn

func (container *Docker) HasDependencyOn(kind string, group string, identifier string, runtime *types.Runtime) bool

func (*Docker) IsDaemonRunning

func (container *Docker) IsDaemonRunning()

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) RemoveNetworkInfoTS

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

func (*Docker) Rename

func (container *Docker) Rename(runtime *types.Runtime, newName string) error

func (*Docker) Restart

func (container *Docker) Restart(runtime *types.Runtime) bool

func (*Docker) Run

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

func (*Docker) Start

func (container *Docker) Start(runtime *types.Runtime) bool

func (*Docker) Stop

func (container *Docker) Stop(runtime *types.Runtime) bool

func (*Docker) SyncNetworkInformation

func (container *Docker) SyncNetworkInformation() error

func (*Docker) UpdateDns

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

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