From 128701881177eeb6d0f0068f2f39bd7b6bb73814 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 18 Jan 2020 17:02:56 +0800 Subject: [PATCH] :art: #3 --- session/processes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/session/processes.go b/session/processes.go index 053ce9b..2006f09 100644 --- a/session/processes.go +++ b/session/processes.go @@ -68,7 +68,7 @@ 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("docker", "run", "--rm", "--cpus", "0.05", "--name", rid, "-v", filePath+":/"+fileName, conf.DockerImageGo, "/"+fileName) + cmd = exec.Command("sh", "-c \"", "docker run --rm --cpus 0.05 --name "+rid+" -v "+filePath+":/"+fileName+" "+conf.DockerImageGo+" /"+fileName+"\"") } else { cmd = exec.Command(filePath) curDir := filepath.Dir(filePath)