fix(test): use --network=host for Docker-in-Docker compatibility
Docker Build and Push / lint (pull_request) Successful in 1m9s
Docker Build and Push / build (pull_request) Successful in 2m20s
Docker Build and Push / test (pull_request) Failing after 1m41s
Docker Build and Push / push (pull_request) Has been skipped

This commit is contained in:
2026-06-08 17:57:50 +00:00
parent 268d8d2b62
commit 9da0efa29c
+3 -4
View File
@@ -37,12 +37,11 @@ assert_match() {
}
echo "Running container: $IMAGE"
docker run -d --name "$CONTAINER_NAME" -p 0:8080 "$IMAGE" >/dev/null
docker run -d --name "$CONTAINER_NAME" --network=host "$IMAGE" >/dev/null
CONTAINER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$CONTAINER_NAME")
BASE_URL="http://${CONTAINER_IP}:8080"
BASE_URL="http://localhost:8080"
echo "Waiting for container (ip $CONTAINER_IP)..."
echo "Waiting for container on localhost:8080..."
for i in $(seq 1 30); do
if curl -sf "$BASE_URL/" >/dev/null 2>&1; then
echo "Container ready after ${i}s"