GMB-Scraper/Dockerfile

43 lines
870 B
Text
Raw Normal View History

FROM python:3.11-slim
# Install system deps
RUN apt-get update && apt-get install -y \
wget \
gnupg \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libcairo2 \
libasound2 \
libxshmfence1 \
&& rm -rf /var/lib/apt/lists/*
# Install Playwright browsers
RUN pip install playwright && playwright install chromium --with-deps
# Copy app
WORKDIR /app
COPY lib/ lib/
COPY gmb_scraper.py .
COPY gmb_to_voice.py .
COPY scrape.sh .
COPY .env .env
# Install Python deps
RUN pip install playwright-stealth python-dotenv requests beautifulsoup4 lxml
# Create output dir
RUN mkdir -p /root/.hermes/cache/gmb /root/.hermes/logs/gmb
# Default command
ENTRYPOINT ["python", "gmb_scraper.py"]
CMD ["--help"]