Sign inSign up

alexjunk/emonhub

By alexjunk

•Updated 8 months ago

emonhub docker image

Image
Internet of things
Monitoring & observability
0

1.5K

alexjunk/emonhub repository overview

Relevant Dockerfile⁠

to run emonhub⁠ in container :

sudo docker run --rm -it alexjunk/emonhub /opt/openenergymonitor/emonhub/src/./emonhub.py

⁠For a real use case

download a emonhub.conf file on the host

wget https://raw.githubusercontent.com/openenergymonitor/emonhub/master/conf/emonhub.conf

then run emonhub :

  • mounting device ttyAMA0
  • joining container bios2-themis-1 running emoncms standalone image⁠
  • mounting the conf file so that you can modify it from the host
sudo docker run --rm -it --device=/dev/ttyAMA0 -v $(pwd)/emonhub.conf:/opt/openenergymonitor/emonhub/conf/emonhub.conf --network=container:bios2-themis-1 alexjunk/emonhub /opt/openenergymonitor/emonhub/src/./emonhub.py

⁠The same with cgroups :

ls -al /dev/tty*

This gives the major number of ttyAMA0 :

crw-rw---- 1 root dialout 204, 64 Apr  7 22:17 /dev/ttyAMA0

You can now run the emonhub container :

sudo docker run --rm -it -v /dev:/dev --device-cgroup-rule='c 204:* rmw' -v /opt/OBM/BIOS2/conf/emonhub.conf:/opt/openenergymonitor/emonhub/conf/emonhub.conf --network=container:bios2-themis-1 alexjunk/emonhub /opt/openenergymonitor/emonhub/src/./emonhub.py

Tag summary

Content type

Image

Digest

sha256:5f1ffe374…

Size

66.4 MB

Last updated

8 months ago

docker pull alexjunk/emonhub