19 lines
458 B
Docker
19 lines
458 B
Docker
# Use the official Python image from the Docker Hub
|
|
FROM python:3.9-slim
|
|
|
|
# Set the working directory inside the container
|
|
WORKDIR /app
|
|
|
|
# Copy the requirements file and the script into the container
|
|
COPY requirements.txt .
|
|
COPY tmobile_monitor.py .
|
|
|
|
# Install the Python dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Expose the port that the Prometheus client will use
|
|
EXPOSE 8000
|
|
|
|
# Run the script
|
|
CMD ["python", "tmobile_monitor.py"]
|