|  | @@ -21,7 +21,7 @@ public class DockerExe {
 | 
											
												
													
														|  |      public static final String DOCKERHOST="tcp://192.168.0.132:2375/";
 |  |      public static final String DOCKERHOST="tcp://192.168.0.132:2375/";
 | 
											
												
													
														|  |      public static final String APIVERSION="1.13.1";
 |  |      public static final String APIVERSION="1.13.1";
 | 
											
												
													
														|  |      // 获取容器信息
 |  |      // 获取容器信息
 | 
											
												
													
														|  | -    public static String getDocker(Integer aid){
 |  | 
 | 
											
												
													
														|  | 
 |  | +    public static String getDocker(Integer aid,String stype){
 | 
											
												
													
														|  |          DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder()
 |  |          DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder()
 | 
											
												
													
														|  |                  .withDockerHost(DOCKERHOST) // 设置 Docker 主机地址
 |  |                  .withDockerHost(DOCKERHOST) // 设置 Docker 主机地址
 | 
											
												
													
														|  |                  .withDockerTlsVerify(false) // 启用 TLS 验证
 |  |                  .withDockerTlsVerify(false) // 启用 TLS 验证
 | 
											
										
											
												
													
														|  | @@ -34,7 +34,7 @@ public class DockerExe {
 | 
											
												
													
														|  |          DockerClient dockerClient = DockerClientBuilder.getInstance(config)
 |  |          DockerClient dockerClient = DockerClientBuilder.getInstance(config)
 | 
											
												
													
														|  |                  .withDockerHttpClient(httpClient)
 |  |                  .withDockerHttpClient(httpClient)
 | 
											
												
													
														|  |                  .build();
 |  |                  .build();
 | 
											
												
													
														|  | -        InspectContainerResponse containerInfo = dockerClient.inspectContainerCmd(aid.toString()).exec();
 |  | 
 | 
											
												
													
														|  | 
 |  | +        InspectContainerResponse containerInfo = dockerClient.inspectContainerCmd(stype+"_"+aid.toString()).exec();
 | 
											
												
													
														|  |          //exited 停止  running  运行
 |  |          //exited 停止  running  运行
 | 
											
												
													
														|  |          try{
 |  |          try{
 | 
											
												
													
														|  |              return containerInfo.getState().getStatus();
 |  |              return containerInfo.getState().getStatus();
 | 
											
										
											
												
													
														|  | @@ -44,7 +44,7 @@ public class DockerExe {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  | -    private static void stopDocker(Integer aid){
 |  | 
 | 
											
												
													
														|  | 
 |  | +    public static void stopDocker(Integer aid, String stype){
 | 
											
												
													
														|  |          DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder()
 |  |          DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder()
 | 
											
												
													
														|  |                  .withDockerHost(DOCKERHOST) // 设置 Docker 主机地址
 |  |                  .withDockerHost(DOCKERHOST) // 设置 Docker 主机地址
 | 
											
												
													
														|  |                  .withDockerTlsVerify(false) // 启用 TLS 验证
 |  |                  .withDockerTlsVerify(false) // 启用 TLS 验证
 | 
											
										
											
												
													
														|  | @@ -58,7 +58,7 @@ public class DockerExe {
 | 
											
												
													
														|  |                  .withDockerHttpClient(httpClient)
 |  |                  .withDockerHttpClient(httpClient)
 | 
											
												
													
														|  |                  .build();
 |  |                  .build();
 | 
											
												
													
														|  |          try {
 |  |          try {
 | 
											
												
													
														|  | -            dockerClient.stopContainerCmd(aid.toString())
 |  | 
 | 
											
												
													
														|  | 
 |  | +            dockerClient.stopContainerCmd(stype+"_"+aid.toString())
 | 
											
												
													
														|  |                      .withTimeout(1000)
 |  |                      .withTimeout(1000)
 | 
											
												
													
														|  |                      .exec();
 |  |                      .exec();
 | 
											
												
													
														|  |              dockerClient.removeConfigCmd(aid.toString())
 |  |              dockerClient.removeConfigCmd(aid.toString())
 | 
											
										
											
												
													
														|  | @@ -87,7 +87,6 @@ public class DockerExe {
 | 
											
												
													
														|  |                  .withStdOut(true)
 |  |                  .withStdOut(true)
 | 
											
												
													
														|  |                  .withStdErr(true)
 |  |                  .withStdErr(true)
 | 
											
												
													
														|  |                  .withFollowStream(true);
 |  |                  .withFollowStream(true);
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |          // 使用 ResultCallback.Adapter 处理日志
 |  |          // 使用 ResultCallback.Adapter 处理日志
 | 
											
												
													
														|  |          logContainerCmd.exec(logsexe).awaitCompletion();
 |  |          logContainerCmd.exec(logsexe).awaitCompletion();
 | 
											
												
													
														|  |      }
 |  |      }
 |