-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (29 loc) · 961 Bytes
/
Dockerfile
File metadata and controls
42 lines (29 loc) · 961 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
# Build stage
FROM python:3.13-slim as builder
# Install poetry
RUN pip install poetry==1.7.1
# Set working directory
WORKDIR /app
# Copy poetry files
COPY pyproject.toml poetry.lock ./
# Configure poetry to not use a virtual environment
RUN poetry config virtualenvs.create false
# Install dependencies
RUN poetry install --no-dev --no-interaction --no-ansi
# Copy the rest of the application
COPY . .
# Final stage
FROM python:3.13-slim
# Set working directory
WORKDIR /app
# Create directory for data persistence
RUN mkdir -p /data
# Set environment variable for wordlist path
ENV SPELLWELL_WORDLIST_PATH=/data/wordlist
# Copy only the necessary files from the builder stage
COPY --from=builder /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages
COPY --from=builder /app/spellwell /app/spellwell
# Set the entrypoint
ENTRYPOINT ["python", "-m", "spellwell.cli"]
# Define volume for data persistence
VOLUME ["/data"]