MCPcopy Create free account
hub / github.com/Xpl0itU/passiveMachine / getDockerClient

Function getDockerClient

docker.go:22–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20var dockerClient *client.Client
21
22func getDockerClient() (*client.Client, error) {
23 if dockerClient == nil {
24 var err error
25 dockerClient, err = client.NewClientWithOpts(client.WithHostFromEnv(), client.WithAPIVersionNegotiation())
26 if err != nil {
27 return nil, err
28 }
29 }
30 return dockerClient, nil
31}
32
33func buildDockerComposeFile(menuItems []MenuItem) string {
34 dockerComposeFile := `version: '3'

Callers 2

pullImageBlockingFunction · 0.85
createContainerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected