Documentation
¶
Index ¶
- Constants
- func CheckDockerVersion(versionConstraint string) error
- func CheckForHTTPS(container docker.APIContainers) bool
- func ComposeCmd(composeFiles []string, action ...string) (string, string, error)
- func ComposeNoCapture(composeFiles []string, action ...string) error
- func ContainerName(container docker.APIContainers) string
- func ContainerWait(timeout time.Duration, labels map[string]string) error
- func EnsureDdevNetwork()
- func EnsureNetwork(client *docker.Client, name string) error
- func FindContainerByLabels(labels map[string]string) (docker.APIContainers, error)
- func FindContainersByLabels(labels map[string]string) ([]docker.APIContainers, error)
- func GetAppContainers(sitename string) ([]docker.APIContainers, error)
- func GetContainerEnv(key string, container docker.APIContainers) string
- func GetContainerHealth(container docker.APIContainers) string
- func GetDockerClient() *docker.Client
- func GetDockerContainers(allContainers bool) ([]docker.APIContainers, error)
- func GetPublishedPort(privatePort int64, container docker.APIContainers) int64
- func NetExists(client *docker.Client, name string) bool
Constants ¶
const NetName = "ddev_default"
NetName provides the default network name for ddev.
Variables ¶
This section is empty.
Functions ¶
func CheckDockerVersion ¶
CheckDockerVersion determines if the docker version of the host system meets the provided version constraints. See https://godoc.org/github.com/Masterminds/semver#hdr-Checking_Version_Constraints for examples defining version constraints.
func CheckForHTTPS ¶ added in v0.9.4
func CheckForHTTPS(container docker.APIContainers) bool
CheckForHTTPS determines if a container has the HTTPS_EXPOSE var set to route 443 traffic to 80
func ComposeCmd ¶
ComposeCmd executes docker-compose commands via shell. returns stdout, stderr, error/nil
func ComposeNoCapture ¶ added in v0.9.4
ComposeNoCapture executes a docker-compose command while leaving the stdin/stdout/stderr untouched so that people can interact with them directly, for example with ddev ssh.
func ContainerName ¶
func ContainerName(container docker.APIContainers) string
ContainerName returns the containers human readable name.
func ContainerWait ¶
ContainerWait provides a wait loop to check for container in "healthy" status. timeout is in seconds.
func EnsureDdevNetwork ¶ added in v0.9.4
func EnsureDdevNetwork()
EnsureDdevNetwork just creates or ensures the ddev_default network exists or exits with fatal.
func EnsureNetwork ¶
EnsureNetwork will ensure the docker network for ddev is created.
func FindContainerByLabels ¶
FindContainerByLabels takes a map of label names and values and returns any docker containers which match all labels.
func FindContainersByLabels ¶
FindContainersByLabels takes a map of label names and values and returns any docker containers which match all labels.
func GetAppContainers ¶
GetAppContainers retrieves docker containers for a given sitename.
func GetContainerEnv ¶
GetContainerEnv returns the value of a given environment variable from a given container.
func GetContainerHealth ¶
func GetContainerHealth(container docker.APIContainers) string
GetContainerHealth retrieves the status of a given container. The status string returned by docker contains uptime and the health status in parenths. This function will filter the uptime and return only the health status.
func GetDockerClient ¶
func GetDockerClient() *docker.Client
GetDockerClient returns a docker client for a docker-machine.
func GetDockerContainers ¶
GetDockerContainers returns a slice of all docker containers on the host system.
func GetPublishedPort ¶
GetPublishedPort returns the published port for a given private port.
Types ¶
This section is empty.