MCPcopy Create free account
hub / github.com/ddev/ddev / GetAppContainers

Function GetAppContainers

pkg/dockerutil/containers.go:530–540  ·  view source on GitHub ↗

GetAppContainers retrieves docker containers for a given sitename.

(sitename string)

Source from the content-addressed store, hash-verified

528
529// GetAppContainers retrieves docker containers for a given sitename.
530func GetAppContainers(sitename string) ([]container.Summary, error) {
531 label := map[string]string{
532 "com.ddev.site-name": sitename,
533 "com.docker.compose.oneoff": "False",
534 }
535 containers, err := FindContainersByLabels(label)
536 if err != nil {
537 return containers, err
538 }
539 return containers, nil
540}
541
542// GetContainerEnv returns the value of a given environment variable from a given container.
543func GetContainerEnv(key string, c container.Summary) string {

Callers 4

TrackProjectMethod · 0.92
DescribeMethod · 0.92
PauseMethod · 0.92
TestGetAppContainersFunction · 0.92

Calls 1

FindContainersByLabelsFunction · 0.85

Tested by 1

TestGetAppContainersFunction · 0.74