diff --git a/session/processes.go b/session/processes.go index 2006f09..3cf5846 100644 --- a/session/processes.go +++ b/session/processes.go @@ -68,7 +68,9 @@ func RunHandler(w http.ResponseWriter, r *http.Request, channel map[string]*util var cmd *exec.Cmd if conf.Docker { fileName := filepath.Base(filePath) - cmd = exec.Command("sh", "-c \"", "docker run --rm --cpus 0.05 --name "+rid+" -v "+filePath+":/"+fileName+" "+conf.DockerImageGo+" /"+fileName+"\"") + cmdStr := "docker run --rm --cpus 0.05 --name " + rid + " -v " + filePath + ":/" + fileName + " " + conf.DockerImageGo + " /" + fileName + logger.Info(cmdStr) + cmd = exec.Command("sh", "-c", cmdStr) } else { cmd = exec.Command(filePath) curDir := filepath.Dir(filePath)