-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.dev
More file actions
41 lines (29 loc) · 1.16 KB
/
Dockerfile.dev
File metadata and controls
41 lines (29 loc) · 1.16 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
38
39
40
41
# Development Dockerfile for fakevine using multi-stage build
# Stage 1: Builder - Install dependencies using uv
FROM python:3.14-alpine@sha256:dd4d2bd5b53d9b25a51da13addf2be586beebd5387e289e798e4083d94ca837a AS builder
WORKDIR /app
# Install uv
RUN apk add --no-cache gcc musl-dev && \
pip install uv && \
rm -rf /var/cache/apk/*
# Copy project files
COPY . .
# Create virtual environment and install dependencies
RUN uv sync --frozen
# Stage 2: Runtime - Minimal image with only the virtual environment
FROM python:3.14-alpine@sha256:dd4d2bd5b53d9b25a51da13addf2be586beebd5387e289e798e4083d94ca837a
WORKDIR /app
RUN apk --no-cache add curl
# Copy virtual environment from builder
COPY --from=builder /app/.venv /app/.venv
COPY --from=builder /app /app
# Create data directory for logs, config, and databases
RUN mkdir -p /data
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV ROOT_PATH_FOR_DYNACONF=/data/
ENV PATH=/app/.venv/bin:$PATH
# Expose the application port and debugpy port
EXPOSE 8463 5678
# Set the entrypoint to run with debugpy
ENTRYPOINT ["python", "-Xfrozen_modules=off", "-m", "debugpy", "--listen", "0.0.0.0:5678", "src/fakevine/__init__.py"]