-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (40 loc) · 1.03 KB
/
Copy pathDockerfile
File metadata and controls
47 lines (40 loc) · 1.03 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
42
43
44
45
46
47
FROM python:3.13-slim
# System deps for Playwright (used by schwab_api) and general builds
RUN apt-get update && apt-get install -y \
curl \
wget \
ca-certificates \
git \
build-essential \
libglib2.0-0 \
libnss3 \
libgdk-pixbuf-2.0-0 \
libgtk-3-0 \
libdrm2 \
libatk-bridge2.0-0 \
libxkbcommon0 \
libasound2 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libxshmfence1 \
fonts-liberation \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python deps first for better layer caching
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Preinstall Playwright browsers into the image so runtime doesn't need network
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
RUN python -m playwright install
# Copy project files
COPY . /app
# Environment
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH=/app:/app/scripts
# Default command
CMD ["python", "main.py"]