-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (29 loc) · 962 Bytes
/
Dockerfile
File metadata and controls
38 lines (29 loc) · 962 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
FROM python:3.9-slim
# 1. Install System Dependencies (Chrome, Node, Netcat)
RUN apt-get update && apt-get install -y \
wget \
gnupg \
unzip \
curl \
netcat-openbsd \
&& rm -rf /var/lib/apt/lists/*
# 2. Install Chrome & Chromedriver
# Note: In modern slim images, we might use chromium provided by Debian to ensure compat
RUN apt-get update && apt-get install -y chromium chromium-driver
# 3. Install Node.js v20
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs
# 4. Set Workspace
WORKDIR /app
# 5. Install Python Dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 6. Install Frontend Dependencies (Cached)
COPY Client/package.json Client/package-lock.json ./Client/
RUN cd Client && npm ci
# 7. Copy Project Code
COPY . .
# 8. Set Permissions for Helper Scripts
RUN chmod +x entrypoint.sh
# 9. Default Command
ENTRYPOINT ["./entrypoint.sh"]