-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.light
More file actions
44 lines (33 loc) · 1011 Bytes
/
Dockerfile.light
File metadata and controls
44 lines (33 loc) · 1011 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
33
34
35
36
37
38
39
40
41
42
43
44
# syntax=docker/dockerfile:1
FROM python:3.11-slim
# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
# Poetry install
ENV POETRY_VERSION=1.7.1
RUN pip install "poetry==$POETRY_VERSION"
# Set workdir
WORKDIR /app
# Copy pyproject and poetry.lock first for caching
COPY pyproject.toml poetry.lock ./
# Install dependencies
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi
# Copy the rest of the code
COPY . .
# Create models directory and set permissions
RUN mkdir -p /app/models && chmod 755 /app/models
# Environment variables
ENV PYTHONPATH=/app
ENV METASPLOIT_ROOT=/opt/metasploit-framework
ENV GPT4ALL_MODEL_PATH=/app/models
# Make startup script executable
RUN chmod +x startup.sh
# Expose port for potential web interface
EXPOSE 8080
# Use startup script as entrypoint (will download models on first run)
ENTRYPOINT ["./startup.sh"]