This commit is contained in:
		
							parent
							
								
									3193610b7f
								
							
						
					
					
						commit
						1287018811
					
				| 
						 | 
					@ -68,7 +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)
 | 
				
			||||||
		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 {
 | 
						} else {
 | 
				
			||||||
		cmd = exec.Command(filePath)
 | 
							cmd = exec.Command(filePath)
 | 
				
			||||||
		curDir := filepath.Dir(filePath)
 | 
							curDir := filepath.Dir(filePath)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue