docker

package
v0.0.0-...-8023482 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigEnv

func GetConfigEnv(ctx context.Context, cli DockerAPI, containerName, envName string) (string, error)

func GetSecret

func GetSecret(ctx context.Context, cli DockerAPI, c *config.Context, containerName, secretName string) (string, error)

Types

type DockerAPI

type DockerAPI interface {
	ContainerInspect(ctx context.Context, container string) (dockercontainer.InspectResponse, error)
	ContainerList(ctx context.Context, options dockercontainer.ListOptions) ([]dockercontainer.Summary, error)
}

DockerAPI abstracts the Docker client functionality needed by our package.

type DockerClient

type DockerClient struct {
	CLI    DockerAPI
	SshCli *ssh.Client
	// contains filtered or unexported fields
}

func GetDockerCli

func GetDockerCli(activeCtx *config.Context) (*DockerClient, error)

func (*DockerClient) Close

func (d *DockerClient) Close() error

func (*DockerClient) GetContainerName

func (d *DockerClient) GetContainerName(c *config.Context, service string, neverPrefixProfile bool) (string, error)

func (*DockerClient) GetServiceIp

func (d *DockerClient) GetServiceIp(ctx context.Context, c *config.Context, containerName string) (string, error)

Jump to

Keyboard shortcuts

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