-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 875 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM python:3.11-slim
LABEL maintainer="Johnny Watters <0ai@cyberviserai.com>"
LABEL description="Hancock — AI-powered cybersecurity agent maintained and licensed by Johnny Watters (0ai-Cyberviser)"
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy source
COPY hancock_agent.py .
COPY hancock_constants.py .
COPY input_validator.py .
COPY orchestration_controller.py .
COPY collectors/ collectors/
COPY formatter/ formatter/
COPY monitoring/ monitoring/
# Expose API port
EXPOSE 5000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:5000/health')" || exit 1
# Run as non-root
RUN useradd -m hancock
USER hancock
CMD ["python", "hancock_agent.py", "--server", "--port", "5000"]