/Docker-Image-for-Pi.Alert

Docker Image for Pi.Alert

Primary LanguageDockerfileGNU General Public License v3.0GPL-3.0

A docker image for Pi.Alert 🐳

All credit for Pi.Alert goes to: pucherot/Pi.Alert.

The Docker image is available at jokobsk/Pi.Alert - Docker Hub.

The source Docker file is available here on GitHub.

Changing the configuration 🔧

  • Download pialert.conf and version.conf from here.
  • Map the container folder /home/pi/pialert/config to your own folder containing pialert.conf and version.conf.
  • In pialert.config specify your network adapter (will probably be eth0 or eth1) and the network filter, e.g. if your DHCP server assigns IPs in the 192.168.1.0 to 192.168.1.255 range specify it the following way: SCAN_SUBNETS = '192.168.1.0/24 --interface=eth0'
  • Set the TZ environment variable to your current time zone (e.g.Europe/Paris). Find your time zone here.

Database backup and restore

The docker image creates a DB copy once every 30 min by copying the DB to /home/pi/pialert/config/pialert.db_bak.

If you have a backup already available, make sure you rename this file if you want to keep older backups before starting a new container.

You can backup the DB by also ad-hoc by running the follow command in the container:

cp /home/pi/pialert/db/pialert.db /home/pi/pialert/config/pialert.db_bak

Restoring the DB:

cp /home/pi/pialert/config/pialert.db_bak /home/pi/pialert/db/pialert.db

Running the container

You will have to probably run the container on the host network, e.g: sudo docker run --rm --net=host jokobsk/pi.alert

Port

The container runs on the port :20211.

UI URL

The UI is located on <host IP>:20211/pialert/

Please note - the cronjob is executed every 1, 5 and 15 minutes so wait that long for all of the scans to run.

Disclaimer

This is my second container and I might have used unconventional hacks so if anyone is more experienced, feel free to fork/create pull requests.

Support ☕

Please only donate if you don't have any debt yourself. Support yourself first, then others.

Buy Me A Coffee