Spaces:
Runtime error
Runtime error
File size: 928 Bytes
9b55f4a ba8bd07 9b55f4a ba8bd07 9b55f4a ba8bd07 9b55f4a ba8bd07 9b55f4a ba8bd07 9b55f4a ba8bd07 9b55f4a ba8bd07 9b55f4a ba8bd07 9b55f4a ba8bd07 9b55f4a ba8bd07 | 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 | # Use Python 3.11 slim (Debian Bookworm)
FROM python:3.11-slim
# Prevent Python buffering
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# 1. Install dependencies (wget, curl, gnupg, unzip)
RUN apt-get update && apt-get install -y \
wget \
curl \
gnupg \
unzip \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# 2. Install Google Chrome Stable DIRECTLY (Fixes the apt-key error)
# We download the .deb file and install it with apt-get
RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& apt-get update \
&& apt-get install -y ./google-chrome-stable_current_amd64.deb \
&& rm google-chrome-stable_current_amd64.deb \
&& apt-get clean
# 3. Install Python libraries
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 4. Copy script
COPY monitor.py .
# 5. Run
CMD ["python", "monitor.py"] |