Got this error today when I started a docker container with the latest available image from docker hub (2022.02.1):
HOST=sonic HOST_FROM=10.18.11.32 MESSAGE="Failed to set capabilities on file `/usr/bin/pihole-FTL' (Operation not supported)" MSGID=pihole PID=4630 PROGRAM=pihole SOURCE=s_network HOST=sonic HOST_FROM=10.18.11.32 MESSAGE="The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file" MSGID=pihole PID=4630 PROGRAM=pihole SOURCE=s_network HOST=sonic HOST_FROM=10.18.11.32 MESSAGE="ERROR: Unable to set capabilities for pihole-FTL. Cannot run as non-root." MSGID=pihole PID=4630 PROGRAM=pihole SOURCE=s_network HOST=sonic HOST_FROM=10.18.11.32 MESSAGE=" If you are seeing this error, please set the environment variable 'DNSMASQ_USER' to the value 'root'" MSGID=pihole PID=4630 PROGRAM=pihole SOURCE=s_network
UPS :)
Luckily for me, the solution was in the message so all I had to do was to add the following environment variable DNSMASQ_USER=root on container's configuration file.
sonic:services# docker inspect pihole | egrep "Env|DNS" "Env": [ "DNSMASQ_USER=root",
If you want to start with such environment variable you use -e.
Example:
docker run -d --name pihole -e DNSMASQ_USER=root pihole/pihole