-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 1.13 KB
/
Copy pathDockerfile
File metadata and controls
35 lines (27 loc) · 1.13 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
FROM python:3.12-slim
# Environment settings
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
# Install system dependencies needed for playwright
RUN apt-get update && apt-get install -y --no-install-recommends \
wget gnupg ca-certificates \
fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 \
libatspi2.0-0 libcups2 libdbus-1-3 libdrm2 libgbm1 libgtk-3-0 \
libnspr4 libnss3 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
libxrender1 libxss1 libxtst6 xdg-utils \
libcairo2 libpango-1.0-0 libpangocairo-1.0-0 \
libgdk-pixbuf2.0-0 libffi-dev shared-mime-info \
libjpeg62-turbo libpng16-16 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy project
COPY website_analyzer /app
# Install Python dependencies
RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& playwright install --with-deps chromium && playwright install-deps
# Create reports and logs directories
RUN mkdir -p reports logs templates/email
EXPOSE 8000
CMD ["python", "main.py", "--help"]