| FROM python:3.9-slim |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| wget \ |
| gnupg \ |
| chromium \ |
| chromium-driver \ |
| libgconf-2-4 \ |
| libnss3 \ |
| libxss1 \ |
| libasound2 \ |
| libatk-bridge2.0-0 \ |
| libgtk-3-0 \ |
| libgbm1 \ |
| fonts-liberation \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| WORKDIR /app |
|
|
| |
| COPY requirements.txt . |
| COPY nb2.py . |
|
|
| |
| RUN pip install -r requirements.txt |
|
|
| |
| ENV CHROME_BIN=/usr/bin/chromium |
| ENV CHROMEDRIVER_PATH=/usr/bin/chromedriver |
| ENV PYTHONUNBUFFERED=1 |
|
|
| |
| RUN mkdir -p /tmp/chrome-data && \ |
| touch /app/cookies.txt && \ |
| chmod 777 /app/cookies.txt |
|
|
| |
| CMD ["python", "nb2.py"] |