-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (31 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
38 lines (31 loc) · 1.01 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
# Use Python 3.11 as base
FROM python:3.11-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV BROWSER=none
WORKDIR /app
# 1. Install System Dependencies
RUN apt-get update && apt-get install -y \
wget \
gnupg \
unzip \
chromium \
chromium-driver \
netcat-openbsd \
&& rm -rf /var/lib/apt/lists/*
# 2. Install Node.js
RUN mkdir -p /etc/apt/keyrings && \
wget -qO- https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && apt-get install -y nodejs
# 3. Install Python Dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 4. Install Node Dependencies
COPY package.json package-lock.json ./
RUN npm install
# 5. Copy the rest
COPY . .
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh