Files
crawlernation/dockerfile
2025-11-12 01:25:12 +01:00

20 lines
725 B
Plaintext

FROM python:3.11-slim
# Install dependencies
RUN apt-get update && \
apt-get install -y wget curl gnupg2 lsb-release && \
curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
apt-get update && \
apt-get install -y google-chrome-stable chromium-driver && \
apt-get clean
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy your crawler code
COPY . /app
WORKDIR /app
CMD ["python3", "crawler.py"]