Run Eaton® Intelligent Power® Protector onto a Debian docker container
1.8K
Eaton® IPP is distributed on their download page for multiple platforms. However, a dockerised instance of IPP may be necessary if:
docker run -d --net host -v ~/ipp/db:/usr/local/Eaton/IntelligentPowerProtector/db -v ~/ipp/configs:/usr/local/Eaton/IntelligentPowerProtector/configs --name eaton-ipp Mavyre/eaton-ipp
Launching the docker with the host network allows IPP to easily scan the network for UPSes, receive the shutdown signals and connect to the host to shut it down.
If the shutdown target is not the host, you can run the docker with -p 4679:4679 -p 4680:4680 instead.
The two folders db and configs are mapped on host to retain IPP configurations and database.
The easiest way with --net host is to use a shutdown script and SSH:
shutdown.example.sh from Github repository can be used as a template.
poweroff command without password in /etc/sudoers:username ALL = (root) NOPASSWD: /usr/sbin/poweroff
-v ~/shutdown.sh:/root/shutdown.shdocker exec eaton-ipp chmod u+x /root/shutdown.sh/root/shutdown.shEach time a shutdown will be triggered by the UPS, the shutdown.sh script will be executed by IPP and shut down the host using SSH.
IPP is not natively compatible with arm/aarch computers. If you want to run it anyway, you need to emulate the AMD64 architecture.
Disclaimer: When emulating, IPP might be slow and eat a lot of resources even when idle.
You can enable the AMD64 emulation using the awesome helper by tonistiigi:
sudo docker run --privileged --rm tonistiigi/binfmt --install amd64
Next, run the docker using AMD64:
docker run -d --platform linux/amd64 --net host -v ~/ipp/db:/usr/local/Eaton/IntelligentPowerProtector/db -v ~/ipp/configs:/usr/local/Eaton/IntelligentPowerProtector/configs --name eaton-ipp Mavyre/eaton-ipp
Even if the container is run with the --restart flag, it will not restart after a reboot.
The AMD64 emulation must be re-enabled before starting the IPP container.
In a Debian environment, the simple solution is to create a systemd service.
First, stop the docker container:
docker stop eaton-ipp
Copy ipp.service from the Github repository into /etc/systemd/system. Then, enable the service on boot, and start IPP:
systemctl enable ipp
systemctl start ipp
The service will re-enable the AMD64 emulation before starting the IPP container at each reboot.
You can contribute on the original Github repository
The docker is distributed under the MIT License. See LICENSE.txt on the Github repository for more information.
Eaton® Intelligent Power® Protector is distributed under its own EULA that you must read and accept prior using it.
Content type
Image
Digest
sha256:28bfe4d37…
Size
86.3 MB
Last updated
almost 3 years ago
docker pull mavyre/eaton-ipp