python:3.9 with MiTemperature2 and php-cli
2.1K
This image runs MiTemperature2 Release v6.1 🌡️
It is built for amd64, arm64 and arm/v6. It should run on PCs and all Raspberries, including the Pi Zero 1!
Successfully tested on:
Quick testing:
docker run --rm --privileged --net=host mreymann/mitemperature2
This is how I run it via Docker Compose:
services:
mitemp2:
image: mreymann/mitemperature2
container_name: mitemp2
restart: unless-stopped
network_mode: host # needed for BLE/DBus
privileged: true # access to Bluetooth hardware
volumes:
- ./sensors.ini:/app/sensors.ini:ro
- ./sendToPrometheusPushGateway.php:/app/sendToPrometheusPushGateway.php:ro
environment:
- TZ=Europe/Berlin
- PYTHONUNBUFFERED=1
command: >
--devicelistfile=/app/sensors.ini --onlydevicelist --battery --rssi --skipidentical 10 --callback-interval 10 --callback sendToPrometheusPushGateway.php
logging:
#driver: "json-file" # use this driver to see logs via "docker logs mitemp2 -f"
driver: "none" # use this driver if everything works. extend your Pi's SD card life! :-)
options:
max-size: "512k"
Note: For the Pi Zero 1 using Docker introduces a bit of overhead. If you need to squeeze out the last drop of performance prefer a normal install.
Content type
Image
Digest
sha256:eb1718727…
Size
31.3 MB
Last updated
6 months ago
docker pull mreymann/mitemperature2