docker

package
v0.0.79 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: GPL-3.0 Imports: 35 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

func IsDaemonRunning added in v0.0.57

func IsDaemonRunning()

Types

type Docker

type Docker struct {
	DockerID      string
	DockerState   string
	Name          string
	GeneratedName string
	Labels        map[string]string
	Group         string
	Image         string
	Tag           string
	Replicas      uint64
	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) error

func (*Docker) Delete

func (container *Docker) Delete() error

func (*Docker) Exec

func (container *Docker) Exec(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() 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) 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) 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(newName string) error

func (*Docker) Restart

func (container *Docker) Restart() 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) RunRaw added in v0.0.57

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

func (*Docker) Start

func (container *Docker) Start() bool

func (*Docker) Stop

func (container *Docker) Stop() 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