@rdwebdesign I am using the Z flag to indicate a bind mount, that is private and unshared (see Use bind mounts | Docker Documentation). Since I am running on a RHEL machine, naturally SELinux is enabled and thus I need to provide this flag. Nevertheless, I temporarily "disabled" SELinux (using setenforce 0
, which sets the SELinux mode to permissive, thus it is not blocking anything; it merely logs what would have been blocked) and tried running without any flags with the very same outcome, unfortunately.
@Bucking_Horn Podman is in simple terms basically docker without a daemon (in a nutshell, please see Podman for a more thorough explanation).
I checked whether there are any environment variables within the container that should not be there anymore and also verified whether environment variables are actually getting set and applied.
I added SKIPGRAVITYONBOOT: 1
to my docker-compose
file to see if pihole would react to it: Yes indeed, pihole skipped updating the gravity database on boot.
Next, I checked which environment variables are actually available simply using env
within the container and sorting it for better readability:
[root@container pihole]# podman exec -it pihole.example.com env | sort
container=podman
CUSTOM_CACHE_SIZE=10000
DNSMASQ_USER=pihole
FLTCONF_PIHOLE_PTR=HOSTNAMEFQDN
FTL_CMD=no-daemon
FTLCONF_LOCAL_IPV4=172.31.4.102
HOME=/root
HOSTNAME=pihole.example.com
IPv6=True
PATH=/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PHP_ENV_CONFIG=/etc/lighttpd/conf-enabled/15-fastcgi-php.conf
PHP_ERROR_LOG=/var/log/lighttpd/error-pihole.log
phpver=php
PIHOLE_DOCKER_TAG=2022.09.4
PIHOLE_INSTALL=/etc/.pihole/automated install/basic-install.sh
S6_BEHAVIOUR_IF_STAGE2_FAILS=2
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
S6_KEEP_ENV=1
S6_OVERLAY_VERSION=v3.1.1.2
SKIPGRAVITYONBOOT=1
TERM=xterm
TZ=Europe/Berlin
[root@container pihole]#
When I remove the environment variable FLTCONF_PIHOLE_PTR: HOSTNAMEFQDN
from the docker-compose
file and restart the container, I can see it is indeed gone:
[root@container pihole]# podman exec -it pihole.example.com env | sort
container=podman
CUSTOM_CACHE_SIZE=10000
DNSMASQ_USER=pihole
FTL_CMD=no-daemon
FTLCONF_LOCAL_IPV4=172.31.4.102
HOME=/root
HOSTNAME=pihole.example.com
IPv6=True
PATH=/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PHP_ENV_CONFIG=/etc/lighttpd/conf-enabled/15-fastcgi-php.conf
PHP_ERROR_LOG=/var/log/lighttpd/error-pihole.log
phpver=php
PIHOLE_DOCKER_TAG=2022.09.4
PIHOLE_INSTALL=/etc/.pihole/automated install/basic-install.sh
S6_BEHAVIOUR_IF_STAGE2_FAILS=2
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
S6_KEEP_ENV=1
S6_OVERLAY_VERSION=v3.1.1.2
SKIPGRAVITYONBOOT=1
TERM=xterm
TZ=Europe/Berlin
[root@container pihole]#
What I cannot tell is whether pihole makes actually use of these; With SKIPGRAVITYONBOOT
I could clearly tell that pihole honored it since it skipped updating the gravity database. For FLTCONF_PIHOLE_PTR
I am unable to tell obviously.Technically the environment variables are there, but I don't know if they are getting used. Is there a way to determine which values have been applied to pihole's runtime configuration (possibly with source, eg: from env, from conf file, etc)?
Regarding the variable REPLY_ADDR4
in the pihole-FTL.conf
: That is most likely an oversight on my end, as I tried different things to apply the settings back then when I moved to a container-based install from a Raspberry Pi and must have forgotten to remove it ultimately. I removed it now from the configuration file and couldn't spot any difference, however.
Further, S6_KEEP_ENV
caught my eye and tried setting it to it's default value (which is 0, according to GitHub - just-containers/s6-overlay: s6 overlay for containers (includes execline, s6-linux-utils & a custom init)), but then the following is seen in the container logs:
s6-rc: info: service legacy-services successfully started
Stopping pihole-FTL
pihole-FTL: no process found
Stopping pihole-FTL
pihole-FTL: no process found
Stopping pihole-FTL
pihole-FTL: no process found
Stopping pihole-FTL
Presumably this happens due to no environment variables being present once pihole starts and switches to the user pihole (at least that is happening according to the container logs): [i] pihole-FTL (no-daemon) will be started as pihole
Anyway, I am really out of ideas - your help is highly appreciated!