MCPcopy
hub / github.com/NVIDIA/aistore / _exec

Function _exec

devtools/docker/docker.go:145–158  ·  view source on GitHub ↗
(containerName string, args ...string)

Source from the content-addressed store, hash-verified

143}
144
145func _exec(containerName string, args ...string) error {
146 if len(args) == 0 {
147 return fmt.Errorf("not enough arguments to execute a command")
148 }
149 temp := append([]string{"docker", "exec", containerName}, args...)
150 cmd := exec.Command(temp[0], temp[1:]...)
151
152 _, err := cmd.Output()
153 if err != nil {
154 glog.Infof("%q error executing docker command: docker exec %s %v.\n", err.Error(), containerName, args)
155 return err
156 }
157 return nil
158}
159
160// Stop simulates killing a target or proxy (by given container id)
161func Stop(cid string) error {

Callers 2

CreateMpathDirFunction · 0.85
RemoveMpathDirFunction · 0.85

Calls 2

InfofFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected