Fix Dockerfile

This commit is contained in:
Odd Stråbø 2023-07-27 17:15:33 +00:00
parent b406214901
commit 2782c4962c
3 changed files with 7 additions and 10 deletions

View File

@ -1,4 +1,6 @@
FROM python:3.11-bookworm
RUN pip install -r requirements.txt
COPY app.py /app.py
ENTRYPOINT python /app.py
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install -r /app/requirements.txt
COPY app.py /app/app.py
ENTRYPOINT python /app/app.py

7
app.py
View File

@ -21,12 +21,7 @@ class ContainerCollector(object):
f"Docker container stats network.{key}",
labels=["container", "device"],
)
# "created", "running", "paused", "restarting", "removing", "exited", "dead"
# node_network_receive_packets_total
# node_network_speed_bytes
# node_network_transmit_bytes_total
# node_network_transmit_dropped_total
# node_network_transmit_errors_total
m_container_status = InfoMetricFamily("docker_container_info", "Container info.", labels=["container"])
for container in self.docker_client.containers(all=True):

View File

@ -1,3 +1,3 @@
docker-py == 1.10.6
prometheus-client == 0.17.1
urllib3 >= 1.26.0, < 2.0.0
urllib3 >= 1.26.0, < 2.0.0