-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (33 loc) · 918 Bytes
/
Dockerfile
File metadata and controls
45 lines (33 loc) · 918 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
45
# Use Python 3.10 as base image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Install system dependencies and Go
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
build-essential
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Install chromium and deps for patchright
RUN patchright install --with-deps chromium
# Cleanup
RUN apt-get autoremove -y \
&& apt-get clean \
&& pip cache purge \
&& rm -rf /var/lib/apt/lists/*
# Copy project files
COPY . .
# Make entrypoint script executable
RUN chmod +x /app/entrypoint.sh
# Expose port 8000
EXPOSE 8000
# Run the application
# CMD ["python", "run.py"]
# Run with entrypoint script using JSON array format
CMD ["./entrypoint.sh"]