jessedp / pihole5-list-tool

A tool for quickly and easily bulk adding allow and ad/block lists to a Pi-hole 5 installation
MIT License
312 stars 18 forks source link

"unable to find config for running docker pihole image, continuing..." even when pihole is running on docker #17

Closed yashgorana closed 4 years ago

yashgorana commented 4 years ago

Environment

Describe the system on which this issue occurred:

pihole5-list-tool: 0.4.5

OS: Raspbian GNU/Linux 10 (buster)

Python: Python 3.7.3

Using Docker? Y .....version: 19.03.11, build 42e35e6

Issue Details

Briefly explain the issue and provide any pertinent stack traces, environment, etc. The tool warns "unable to find config for running docker pihole image, continuing..." even though pihole image is running as a docker container with the name "pihole"

Expected behavior Should detect docker image, and populate the gravity DB path.

Actual behavior Throws a warning and falls back to "/etc/pihole/gravity.db"

Supporting details After running docker inspect pihole, the script looks for mounted volumes and performs an exact-match with "/etc/pihole" at https://github.com/jessedp/pihole5-list-tool/blob/master/utils.py#L110

The volume can be mounted as "/etc/pihole/" and which fails this check, returning a warning. parts[1].startswith("/etc/pihole") should fix this issue.

Anything else Thanks for making this awesome tool <3

jessedp commented 4 years ago

Thanks! Forgot to tag, fixed in 0.4.7