|
|
@@ -209,6 +209,7 @@ public class DockerMetaService extends SuperService {
|
|
|
|
|
|
JSONObject Container = new JSONObject();
|
|
|
Container.set("Name", entity.getName());
|
|
|
+
|
|
|
JSONObject Config = new JSONObject();
|
|
|
Config.put("Image", entity.getImage());
|
|
|
if (StringUtils.isNotEmpty(entity.getWorkingDir())) {
|
|
|
@@ -232,7 +233,6 @@ public class DockerMetaService extends SuperService {
|
|
|
}
|
|
|
}
|
|
|
Config.set("Env", Env);
|
|
|
- Container.set("Config", Config);
|
|
|
|
|
|
JSONObject HostConfig = new JSONObject();
|
|
|
RestartPolicy restartPolicy = entity.getRestartPolicy();
|
|
|
@@ -258,6 +258,7 @@ public class DockerMetaService extends SuperService {
|
|
|
HostConfig.set("Mounts", Mounts);
|
|
|
}
|
|
|
|
|
|
+ JSONObject ExposedPorts = new JSONObject();
|
|
|
|
|
|
JSONObject PortBindings = new JSONObject();
|
|
|
List<PortBinding> portBindings = entity.getPortBindings();
|
|
|
@@ -270,8 +271,11 @@ public class DockerMetaService extends SuperService {
|
|
|
Binding.set("HostPort", portBinding.getHostPort());
|
|
|
bindings.add(Binding);
|
|
|
PortBindings.set(key, bindings);
|
|
|
+ ExposedPorts.set(key, new JSONObject());
|
|
|
}
|
|
|
}
|
|
|
+ Config.set("ExposedPorts", ExposedPorts);
|
|
|
+ Container.set("Config", Config);
|
|
|
HostConfig.set("PortBindings", PortBindings);
|
|
|
|
|
|
Container.set("HostConfig", HostConfig);
|