You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2023/10/30 15:02:52 UTC
(camel-karavan) branch main updated: mvolf-963 - Use findContainer helper method to get the correct container list in DockerService.pauseContainer and DockerService.stopContainer (#964)
This is an automated email from the ASF dual-hosted git repository.
marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
The following commit(s) were added to refs/heads/main by this push:
new 8e2a9190 mvolf-963 - Use findContainer helper method to get the correct container list in DockerService.pauseContainer and DockerService.stopContainer (#964)
8e2a9190 is described below
commit 8e2a919097ac23fa0d3d18cf6e1a550f684570d6
Author: Mario Volf <mv...@users.noreply.github.com>
AuthorDate: Mon Oct 30 16:02:47 2023 +0100
mvolf-963 - Use findContainer helper method to get the correct container list in DockerService.pauseContainer and DockerService.stopContainer (#964)
---
.../src/main/java/org/apache/camel/karavan/docker/DockerService.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/docker/DockerService.java b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/docker/DockerService.java
index d547e6bb..23ce0464 100644
--- a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/docker/DockerService.java
+++ b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/docker/DockerService.java
@@ -321,7 +321,7 @@ public class DockerService extends DockerServiceUtils {
}
public void pauseContainer(String name) {
- List<Container> containers = getDockerClient().listContainersCmd().withShowAll(true).withNameFilter(List.of(name)).exec();
+ List<Container> containers = findContainer(name);
if (containers.size() == 1) {
Container container = containers.get(0);
if (container.getState().equals("running")) {
@@ -331,7 +331,7 @@ public class DockerService extends DockerServiceUtils {
}
public void stopContainer(String name) {
- List<Container> containers = getDockerClient().listContainersCmd().withShowAll(true).withNameFilter(List.of(name)).exec();
+ List<Container> containers = findContainer(name);
if (containers.size() == 1) {
Container container = containers.get(0);
if (container.getState().equals("running")) {