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):