-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (28 loc) · 1.06 KB
/
Copy pathDockerfile
File metadata and controls
37 lines (28 loc) · 1.06 KB
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
33
34
35
36
37
FROM python:3.11-slim
LABEL maintainer="BitBox01 Recovery Tool"
LABEL description="BitBox01 password recovery with GPU acceleration, AI-powered generation and web dashboard"
# Prevent Python from buffering stdout/stderr (important for live logging)
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
WORKDIR /app
# Install dependencies first (cached layer)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY blockchain.py .
COPY cracker.py .
COPY generator.py .
COPY gpu_engine.py .
COPY server.py .
COPY verify_gpu.py .
COPY static/ static/
# Create directories for mounted volumes (fallback if not mounted)
RUN mkdir -p /app/state /app/candidates
# Expose dashboard port
EXPOSE 3010
# Health check — hit the status API
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:3010/api/status')" || exit 1
# Default: run the server (which orchestrates cracker + generator)
ENTRYPOINT ["python", "server.py"]
CMD ["--config", "/app/config.json"]