diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..0b5d549 --- /dev/null +++ b/dockerfile @@ -0,0 +1,20 @@ +FROM python:3.11-slim + +# Install Chrome and dependencies +RUN apt-get update && \ + apt-get install -y wget gnupg2 && \ + wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \ + echo "deb [arch=amd64] 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"] \ No newline at end of file