Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs are stored in the Docker image, causing it to grow #271

Closed
spants opened this issue May 16, 2018 · 3 comments
Closed

Logs are stored in the Docker image, causing it to grow #271

spants opened this issue May 16, 2018 · 3 comments
Labels

Comments

@spants
Copy link

spants commented May 16, 2018

Logs are being written to /var/logs causing the docker to expand over time

This is a...

  • [ x] Issue trying to run the docker image

Description

Logs for pihole are being written to /var/logs rather than a volume

Expected Behavior

request that they are written to an external volume

Actual Behavior

fills up /var/log

Steps to Reproduce and debugging done

run docker and watch /var/logs

Your Environment

  • Docker Host Operating System and OS Version: Unraid 6.5.2
  • Docker Version:
  • Hardware architecture: x86
@nxadm
Copy link
Contributor

nxadm commented May 16, 2018

Edit the 01-pihole.conf and set it to write the log to a volume you mount in the container. Good catch.

/opt/docker/pihole/rw/dnsmasq.d# ack /var/log
01-pihole.conf
38:log-facility=/var/log/pihole.log

In my case, my volumes as like this:

# grep -A2 volumes: docker-compose.yml 
    volumes:
      - /opt/docker/pihole/rw/pihole:/etc/pihole
      - /opt/docker/pihole/rw/dnsmasq.d:/etc/dnsmasq.d

So, as an example, change log-facility=/var/log/pihole.log to log-facility=/etc/pihole/pihole.log.

@eku
Copy link

eku commented May 16, 2018

If you don't care, just use /dev/null as log output.

@a1lu
Copy link

a1lu commented Jun 10, 2019

This does not work for me. My 01-pihole.conf is overwritten on pihole start
from docke logs:


  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf

I am using latest docker image on raspi / libreELEC with the docker by Linuxserver.io.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants