Commit f617328e authored by 李丛阳's avatar 李丛阳

code

parent ee94873f
...@@ -72,20 +72,20 @@ public class BCodeLxcServiceImpl implements BCodeLxcService { ...@@ -72,20 +72,20 @@ public class BCodeLxcServiceImpl implements BCodeLxcService {
Map param = new HashMap<>(); Map param = new HashMap<>();
param.put("lxcName",lxc.getUserId() + "_" + lxc.getSl()); param.put("lxcName",lxc.getUserId() + "_" + lxc.getSl());
param.put("lxcPort",port); param.put("lxcPort",port);
param.put("lxcPath",lxc.getWorkingDir());
/* config path*/ /* config path*/
String destPath = global.getPHYSICAL_UPLOAD_SERVER_LOCATION() + File.separator + String destPath = global.getBASE_UPLOAD_SERVER_LOCATION() + File.separator +
global.getLxcDockerfilePath() + File.separator + lxc.getUserId() + File.separator; global.getLxcDockerfilePath() + File.separator + lxc.getUserId() + File.separator;
/*启动路径*/
String dockerPath = global.getPHYSICAL_UPLOAD_SERVER_LOCATION() + File.separator +
global.getLxcDockerfilePath() + File.separator + lxc.getUserId() + File.separator;
param.put("lxcPath",dockerPath);
result = freemarkerUtil.generatorFileFromModel(this.getModelProject(lxc.getCode()),destPath result = freemarkerUtil.generatorFileFromModel(this.getModelProject(lxc.getCode()),destPath
,param); ,param);
if(!result.isSuccess()) { if(!result.isSuccess()) {
result = new CommandResult(ResultCode.FAIL,"容器配置文件有误!",lxc); result = new CommandResult(ResultCode.FAIL,"容器配置文件有误!",lxc);
return result; return result;
} }
/*启动路径*/
String dockerPath = global.getPHYSICAL_UPLOAD_SERVER_LOCATION() + File.separator +
global.getLxcDockerfilePath() + File.separator + lxc.getUserId() + File.separator;
/*2.docker-compose 起容器*/ /*2.docker-compose 起容器*/
log.info("执行路径:{}",dockerPath); log.info("执行路径:{}",dockerPath);
result = lxcCommand.startOrDownLxc(dockerPath); result = lxcCommand.startOrDownLxc(dockerPath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment