Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix: drop host port mapping from bootstrap smoke — run all checks via docker exec

Luigi Agosti0f75a591d105
diff --git a/scripts/docker-smoke.sh b/scripts/docker-smoke.sh
index 820f3b1f..b237716f 100644
--- a/scripts/docker-smoke.sh
+++ b/scripts/docker-smoke.sh
@@ -23,27 +23,18 @@ cleanup() {
docker rm -f "$NAME" >/dev/null 2>&1 || true
fi
}
-trap 'FAILED=${FAILED:-1}; cleanup' EXIT
+trap 'rc=$?; [ "$rc" -ne 0 ] && FAILED=1; cleanup' EXIT
-docker run -d --name "$NAME" -e PINCHTAB_TOKEN="$SMOKE_TOKEN" -p 127.0.0.1::9867 "$IMAGE" >/dev/null
-
-# Retry docker port: the mapping may not be visible immediately after 'docker run -d'.
-HOST_PORT=""
-for _ in $(seq 1 10); do
- HOST_PORT="$(docker port "$NAME" 9867/tcp 2>/dev/null | head -1 | awk -F: '{print $NF}')"
- [ -n "$HOST_PORT" ] && break
- sleep 1
-done
-if [ -z "$HOST_PORT" ]; then
- fail "failed to determine published host port after retries"
-fi
+# No host port mapping needed — all checks run via docker exec inside the container.
+docker run -d --name "$NAME" -e PINCHTAB_TOKEN="$SMOKE_TOKEN" "$IMAGE" >/dev/null
health_check() {
- printf 'fail\nsilent\nshow-error\nheader = "Authorization: Bearer %s"\nurl = "http://127.0.0.1:%s/health"\n' "$SMOKE_TOKEN" "$HOST_PORT" \
- | curl --config - >/dev/null 2>&1
+ docker exec "$NAME" sh -c \
+ "wget -qO- --header='Authorization: Bearer $SMOKE_TOKEN' http://127.0.0.1:9867/health" \
+ >/dev/null 2>&1
}
-echo "Waiting for PinchTab to become healthy on port $HOST_PORT..."
+echo "Waiting for PinchTab to become healthy..."
for _ in $(seq 1 60); do
if health_check; then
break