Skip to content

Commit a8772ed

Browse files
committed
GH actions testing
1 parent 7cb30fe commit a8772ed

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

deadend_cli/cli/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import asyncio
1111
from typing import List
1212
import typer
13+
import docker
1314
from rich.console import Console
1415

1516
from deadend_cli.core import config_setup
@@ -44,14 +45,15 @@ def chat(
4445
openapi_spec: Path to an OpenAPI spec to load for context.
4546
"""
4647
# Check Docker availability first
47-
if not check_docker():
48+
docker_client = docker.from_env()
49+
if not check_docker(docker_client):
4850
console.print("\n[red]Docker is required for this application to function properly.[/red]")
4951
console.print("Please install Docker from: https://docs.docker.com/get-docker/")
5052
console.print("Make sure Docker daemon is running, then run this command again.")
5153
raise typer.Exit(1)
5254

5355
# Check pgvector database
54-
if not check_pgvector_container():
56+
if not check_pgvector_container(docker_client):
5557
console.print("\n[red]pgvector database is not running.[/red]")
5658
console.print("Please run 'deadend-cli init' to set up the required services.")
5759
raise typer.Exit(1)
@@ -74,10 +76,8 @@ def chat(
7476
finally:
7577
# Stop pgvector container when chat ends
7678
try:
77-
import docker
78-
docker_client = docker.from_env()
7979
stop_pgvector_container(docker_client)
80-
except Exception as e:
80+
except (docker.errors.DockerException, OSError, ConnectionError) as e:
8181
console.print(f"[yellow]Warning: Could not stop pgvector container: {e}[/yellow]")
8282

8383

setup/images/kalilinux.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM kalilinux/kali-rolling
2-
2+
ENV DEBIAN_FRONTEND="noninteractive"
33
RUN apt update && apt -y install kali-linux-headless inetutils-*
44

55
RUN ["/bin/bash"]

0 commit comments

Comments
 (0)