|
|
@@ -159,7 +159,9 @@ public class DockerMetaService extends SuperService {
|
|
|
Container.set("Name", entity.getName());
|
|
|
JSONObject Config = new JSONObject();
|
|
|
Config.put("Image", entity.getImage());
|
|
|
- Config.put("WorkingDir", entity.getWorkingDir());
|
|
|
+ if (StringUtils.isNotEmpty(entity.getWorkingDir())) {
|
|
|
+ Config.put("WorkingDir", entity.getWorkingDir());
|
|
|
+ }
|
|
|
|
|
|
JSONArray Env = new JSONArray();
|
|
|
if (StringUtils.isNotEmpty(entity.getNetworkTypes())) {
|
|
|
@@ -200,7 +202,10 @@ public class DockerMetaService extends SuperService {
|
|
|
Mounts.add(Mount);
|
|
|
}
|
|
|
}
|
|
|
- HostConfig.set("Mounts", Mounts);
|
|
|
+ if (!Mounts.isEmpty()) {
|
|
|
+ HostConfig.set("Mounts", Mounts);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
JSONObject PortBindings = new JSONObject();
|
|
|
List<PortBinding> portBindings = entity.getPortBindings();
|