Create web server with exported data for Prometheus.
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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"]
|
||||
Reference in New Issue
Block a user