Skip to content

Commit 565883b

Browse files
ericfitzclaude
andcommitted
fix: use container name filter in make status for Podman compatibility
Podman does not support Docker's --filter "publish=<port>" flag. Switch to --filter "name=<container>" which works in both Docker and Podman. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1a386d2 commit 565883b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,16 +1583,16 @@ status:
15831583
else \
15841584
printf "\033[0;31m✗\033[0m %-23s %-6s %-13s %-35s %s\n" "Service" "8080" "Stopped" "-" "make start-server"; \
15851585
fi
1586-
@# Check Database (port 5432) - check for Docker container
1587-
@DB_CONTAINER=$$(docker ps --filter "publish=5432" --filter "status=running" --format "{{.Names}}" 2>/dev/null | head -1 || true); \
1586+
@# Check Database (port 5432) - check for container by name (compatible with Docker and Podman)
1587+
@DB_CONTAINER=$$(docker ps --filter "name=tmi-postgresql" --filter "status=running" --format "{{.Names}}" 2>/dev/null | head -1 || true); \
15881588
if [ -n "$$DB_CONTAINER" ]; then \
15891589
DB_IMAGE=$$(docker ps --filter "name=$$DB_CONTAINER" --format "{{.Image}}" 2>/dev/null | head -1 || echo "unknown"); \
15901590
printf "\033[0;32m✓\033[0m %-23s %-6s %-13s %-35s %s\n" "Database" "5432" "Running" "container: $$DB_CONTAINER" "make stop-database"; \
15911591
else \
15921592
printf "\033[0;31m✗\033[0m %-23s %-6s %-13s %-35s %s\n" "Database" "5432" "Stopped" "-" "make start-database"; \
15931593
fi
1594-
@# Check Redis (port 6379) - check for Docker container
1595-
@REDIS_CONTAINER=$$(docker ps --filter "publish=6379" --filter "status=running" --format "{{.Names}}" 2>/dev/null | head -1 || true); \
1594+
@# Check Redis (port 6379) - check for container by name (compatible with Docker and Podman)
1595+
@REDIS_CONTAINER=$$(docker ps --filter "name=tmi-redis" --filter "status=running" --format "{{.Names}}" 2>/dev/null | head -1 || true); \
15961596
if [ -n "$$REDIS_CONTAINER" ]; then \
15971597
REDIS_IMAGE=$$(docker ps --filter "name=$$REDIS_CONTAINER" --format "{{.Image}}" 2>/dev/null | head -1 || echo "unknown"); \
15981598
printf "\033[0;32m✓\033[0m %-23s %-6s %-13s %-35s %s\n" "Redis" "6379" "Running" "container: $$REDIS_CONTAINER" "make stop-redis"; \

0 commit comments

Comments
 (0)