🎨 非 Windows 环境强制使用 docker

This commit is contained in:
Liang Ding 2019-05-16 18:29:28 +08:00
parent efa278c773
commit 7f28661cb4
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D
1 changed files with 5 additions and 1 deletions

View File

@ -95,7 +95,11 @@ func Load(confPath, confUsers, confIP, confPort, confServer, confLogLevel, confS
cmd := exec.Command("docker", "version")
_, err := cmd.CombinedOutput()
if nil != err {
logger.Warn("Not found 'docker' installed, running user's code will cause security problem")
if !util.OS.IsWindows() {
logger.Errorf("Not found 'docker' installed, running user's code will cause security problem")
os.Exit(-1)
}
} else {
Docker = true
}