This commit is contained in:
parent
624ef3a152
commit
786a0f5c4a
|
@ -68,8 +68,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request, channel map[string]*util
|
||||||
var cmd *exec.Cmd
|
var cmd *exec.Cmd
|
||||||
if conf.Docker {
|
if conf.Docker {
|
||||||
fileName := filepath.Base(filePath)
|
fileName := filepath.Base(filePath)
|
||||||
cmdStr := "docker run --rm --cpus 0.05 --name " + rid + " -v " + filePath + ":/" + fileName + " " + conf.DockerImageGo + " /" + fileName
|
cmdStr := "docker run --rm --cpus 0.5 --name " + rid + " -v " + filePath + ":/" + fileName + " " + conf.DockerImageGo + " /" + fileName
|
||||||
logger.Info(cmdStr)
|
|
||||||
cmd = exec.Command("sh", "-c", cmdStr)
|
cmd = exec.Command("sh", "-c", cmdStr)
|
||||||
} else {
|
} else {
|
||||||
cmd = exec.Command(filePath)
|
cmd = exec.Command(filePath)
|
||||||
|
|
Loading…
Reference in New Issue