remove container after execution

This commit is contained in:
Administrator 2021-10-25 14:47:00 +00:00
parent 277e5c0ba3
commit 354e694bdb

View File

@ -27,7 +27,7 @@ client.connect(mqtt_broker, 1883, 60) # MQTT server address
# -R 187 Inkbird ITH-20R temperature humidity sensor (pool sensor) # -R 187 Inkbird ITH-20R temperature humidity sensor (pool sensor)
docker = docker.from_env() docker = docker.from_env()
container = docker.containers.run("rtl_433:inkbird", "-R 42 -R 187 -F json -T 40 -M time:utc:usec", devices={'/dev/bus/usb/001/004:/dev/bus/usb/001/004:rwm'}) container = docker.containers.run("rtl_433:inkbird", "-R 42 -R 187 -F json -T 40 -M time:utc:usec", devices={'/dev/bus/usb/001/004:/dev/bus/usb/001/004:rwm'}, auto_remove=true)
for line in container.split('\n'): for line in container.split('\n'):