dockerhelper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SwarmLabel             = "dockboy-swarm"
	DockboyInternalNetwork = "dockboy-internal"
	DockboyPublicNetwork   = "dockboy-public"
)

Variables

This section is empty.

Functions

func CreateNetworkIfNotExists

func CreateNetworkIfNotExists(ctx context.Context, remote *client.Client, name string) error

func DeployService

func DeployService(
	ctx context.Context,
	out io.Writer,
	docker *client.Client,
	name, image string,
	replicas uint64,
	networks []string,
	env, labels map[string]string,
	secrets map[string][]byte,
	healthcheck *container.HealthConfig,
	mounts []mount.Mount,
	order string,
) error

func DialSSH

func DialSSH(sshClient *ssh.Client) (*client.Client, error)

func ExecContainer

func ExecContainer(ctx context.Context, remote *client.Client, containerID string, cmd []string) error

func FindService

func FindService(ctx context.Context, remote *client.Client, name string) (*swarm.Service, error)

func InitSwarm

func InitSwarm(ctx context.Context, remote *client.Client, host string) error

func InstallDocker

func InstallDocker(c *ssh.Client) error

func IsDockerInstalled

func IsDockerInstalled(c *ssh.Client) bool

func IsSwarmInactive

func IsSwarmInactive(ctx context.Context, remote *client.Client) (bool, error)

func ListTasks

func ListTasks(ctx context.Context, remote *client.Client, serviceID string) ([]swarm.Task, error)

func NetworkExists

func NetworkExists(ctx context.Context, remote *client.Client, name string) (bool, error)

func WaitForService

func WaitForService(ctx context.Context, out io.Writer, docker *client.Client, serviceID string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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