From 2e53a02446b98e2370eeb72950421f226640bd87 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 5 Mar 2021 20:09:37 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20Docker=20=E5=AE=B9=E5=99=A8=E9=99=90?= =?UTF-8?q?=E5=88=B6=20CPU=20=E5=92=8C=E5=86=85=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- session/processes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/session/processes.go b/session/processes.go index 3bccd70..52353fc 100644 --- a/session/processes.go +++ b/session/processes.go @@ -69,7 +69,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request, channel map[string]*util if conf.Docker { fileName := filepath.Base(filePath) cmd = exec.Command("docker", "run", "--rm", "--name", rid, "-v", filePath+":/"+fileName, conf.DockerImageGo, - "-m", "64M", "--cpus", "0.1", "/"+fileName) + "--memory", "64M", "--cpus", "0.1", "/"+fileName) } else { cmd = exec.Command(filePath) curDir := filepath.Dir(filePath)