This is an automated email from the ASF dual-hosted git repository.

smolnar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 882fe7f77 Fix image name collisions during Docker-based integration 
tests (#1150)
882fe7f77 is described below

commit 882fe7f77676622c950ab424145abb88e0c49a2b
Author: Sandor Molnar <[email protected]>
AuthorDate: Fri Feb 20 14:06:59 2026 +0100

    Fix image name collisions during Docker-based integration tests (#1150)
---
 .github/workflows/compose/docker-compose.yml | 12 ++++++------
 .github/workflows/tests.yml                  |  7 ++++++-
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/compose/docker-compose.yml 
b/.github/workflows/compose/docker-compose.yml
index 601c6b8ca..3aa1798ed 100644
--- a/.github/workflows/compose/docker-compose.yml
+++ b/.github/workflows/compose/docker-compose.yml
@@ -21,22 +21,22 @@ services:
     image: apache/knox-dev:master
 
   knox-dev-local:
-    build: &build_local
+    build:
       context: ../build
       dockerfile: Dockerfile.local
       args:
         knoxurl: ${knoxurl:-https://github.com/apache/knox.git}
         branch: ${branch:-master}
-    image: apache/knox-dev:local
+    image: 
apache/knox-dev:local-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ID:-local}
 
   ldap:
-    build: *build_local # Build LDAP service if not already built
-    image: apache/knox-dev:local
+    image: 
apache/knox-dev:local-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ID:-local}
     command: /ldap.sh
+    depends_on:
+      - knox-dev-local
 
   knox:
-    build: *build_local # Build Knox service if not already built
-    image: apache/knox-dev:local
+    image: 
apache/knox-dev:local-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ID:-local}
     command: /gateway.sh
     volumes:
 #      - ./topologies:/knox-runtime/conf/topologies
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 72e07fa2b..4f90c4a37 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -97,4 +97,9 @@ jobs:
 
       - name: Tear Down Docker Compose
         if: always()
-        run: docker compose -f ./.github/workflows/compose/docker-compose.yml 
down --volumes
+        run: |
+          docker compose -f ./.github/workflows/compose/docker-compose.yml 
down --volumes
+          IMAGE_TAG="local-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ID:-local}"
+          if docker image inspect "apache/knox-dev:$IMAGE_TAG" >/dev/null 
2>&1; then
+            docker rmi "apache/knox-dev:$IMAGE_TAG"
+          fi

Reply via email to