🎨 docker 沙箱

This commit is contained in:
Liang Ding 2019-05-16 12:47:03 +08:00
parent be2d5b74b3
commit 41e2316cc5
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D
2 changed files with 1 additions and 3 deletions

View File

@ -66,9 +66,6 @@ func init() {
log.SetLevel("warn")
logger = log.NewLogger(os.Stdout)
logger.Warnf(*confUsers)
logger.Warnf(*confUsersWorkspaces)
//wd := util.OS.Pwd()
//if strings.HasPrefix(wd, os.TempDir()) {
// logger.Error("Don't run Wide in OS' temp directory or with `go run`")

View File

@ -68,6 +68,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
cmd = exec.Command(filePath)
curDir := filepath.Dir(filePath)
cmd.Dir = curDir
logger.Warnf("Executing user's program [" + filePath + "] without docker sandbox")
}
stdout, err := cmd.StdoutPipe()