docker

package
v0.0.0-...-4c37742 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckClientVersion

func CheckClientVersion()

CheckClientVersion ensures that the client running on this system is supported

func ComposeExitCode

func ComposeExitCode(args ...string) int

ComposeExitCode - Convenience method for docker-compose shell commands returning just the bash exit code

func ComposeResult

func ComposeResult(args ...string) string

ComposeResult - Convenience method for docker-compose shell commands returning a result

func ComposeStdout

func ComposeStdout(args ...string)

ComposeStdout - Convenience method for docker-compose shell commands

func ComposeStreamStdout

func ComposeStreamStdout(args ...string)

ComposeStreamStdout - Convenience method for docker-compose shell commands

func CreateComposerCacheVolume

func CreateComposerCacheVolume()

CreateComposerCacheVolume will create a composer cache volume if it doesn't already exist

func CreateDatabaseVolume

func CreateDatabaseVolume()

CreateDatabaseVolume will create a database volume if it doesn't already exist

func CreateNetwork

func CreateNetwork(name string)

CreateNetwork creates a Docker network with `name`

func CreateOrReplaceTokCompose

func CreateOrReplaceTokCompose(tokComposeYml []byte)

CreateOrReplaceTokCompose ...

func CreateSiteVolume

func CreateSiteVolume()

CreateSiteVolume will create a Site volume if it doesn't already exist

func CreateVolume

func CreateVolume(name string)

CreateVolume - Create a new docker volume with a name

func DeleteVolume

func DeleteVolume(name string)

DeleteVolume - Delete an external docker volume

func Down

func Down()

Down - Pull down all the containers in the compose file

func Exec

func Exec(args []string)

Exec - Execute a command inside the service container

func ExecWithExitCode

func ExecWithExitCode(args []string) (err error)

ExecWithExitCode - Execute a command inside the admin container and return an error if it failed to run

func FindOrCreateTokCompose

func FindOrCreateTokCompose()

FindOrCreateTokCompose ...

func GetAPIClient

func GetAPIClient() (dcli *client.Client)

GetAPIClient - Returns a Docker API Client

func GetContainer

func GetContainer(name, project string) types.Container

GetContainer returns a docker Container object for the specified container, if it exists

func GetContainerIP

func GetContainerIP(name string) (string, error)

GetContainerIP ...

func GetContainerIPFromProject

func GetContainerIPFromProject(containerName, projectName string) (string, error)

GetContainerIPFromProject returns the container IP for a given containerName in a given projectName

func GetContainerList

func GetContainerList() []string

GetContainerList returns a list of all configured containers in the current project context

func GetContainerName

func GetContainerName(name string) (string, error)

GetContainerName ...

func GetContainers

func GetContainers(project string) *[]types.Container

GetContainers returns all containers for a project

func GetDockerHost

func GetDockerHost() string

GetDockerHost - Return the value of the docker host that should be used for this system

func GetGateway

func GetGateway(projectName string) string

GetGateway - Get the Gateway IP adress of the docker network

func GetNetworkName

func GetNetworkName(pn string) string

GetNetworkName takes a project name and returns a matching network name that complies with the same sanitisation that docker compose uses when it auto-generates networks from compose files

func GetTokComposePath

func GetTokComposePath() string

GetTokComposePath ...

func HardCheckTokCompose

func HardCheckTokCompose()

HardCheckTokCompose ...

func ImageExists

func ImageExists(image string) bool

ImageExists - Check if an image exists

func KillContainer

func KillContainer(container string)

KillContainer - Kill an individual container

func LocalPort

func LocalPort(containerName string, containerPort string) string

LocalPort - Return the local port of a container

func MarshalledDefaults

func MarshalledDefaults() []byte

MarshalledDefaults ...

func PrintLogs

func PrintLogs(args []string)

PrintLogs - Print all logs or the container logs to the console

func PrintPorts

func PrintPorts(containers []string)

PrintPorts - Print a port map of all containers, or a single container

func Ps

func Ps()

Ps - Print the container status to the console

func PullImages

func PullImages()

PullImages - Pull all images in compose file

func StatusCheck

func StatusCheck(container, project string) (ok bool)

StatusCheck tests for containers 'running' state. If one container is specified and true if that container is 'running' If no container is specified, all containers must be 'running' or will return false

func Stop

func Stop()

Stop - Stop all containers in the compose file

func StripModWarning

func StripModWarning()

StripModWarning ...

func UnmarshalledDefaults

func UnmarshalledDefaults() conf.ComposeDotTok

UnmarshalledDefaults ...

func Up

func Up()

Up - Lift all containers in the compose file

func UpContainer

func UpContainer(container string)

UpContainer - Lift an individual container

func UpMulti

func UpMulti(args []string)

UpMulti - Lift a specific list of containers

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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