Skip to content

pihole flush generates an error message inside docker containers #1887

@rdwebdesign

Description

@rdwebdesign

Details

If the command pihole flush (or pihole -f) is executed inside a docker container, an error message is generated:

/opt/pihole/piholeLogFlush.sh: line 107: service: command not found

This happens because the v6 container doesn't have a service command and lines 107 and 113 will fail.

How to reproduce the issue

Execute pihole -f inside the container:

piholetest:/# pihole -f
  [✓] Flushed /var/log/pihole/pihole.log ...
  [✓] Flushed /var/log/pihole/FTL.log ...
  [✓] Flushed /var/log/pihole/webserver.log ...
  [i] Flushing database, DNS resolution temporarily unavailable .../opt/pihole/piholeLogFlush.sh: line 107: service: command not found
/opt/pihole/piholeLogFlush.sh: line 113: service: command not found
  [✓] Deleted  queries from long-term query database

These common fixes didn't work for my issue

  • I have tried removing/destroying my container, and re-creating a new container
  • I have tried fresh volume data by backing up and moving/removing the old volume data
  • I have tried running the stock docker run example(s) in the readme (removing any customizations I added)
  • I have tried a newer or older version of Docker Pi-hole (depending what version the issue started in for me)
  • I have tried running without my volume data mounts to eliminate volumes as the cause

If the above debugging / fixes revealed any new information note it here.
Add any other debugging steps you've taken or theories on root cause that may help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions