Docker Container Socker Error NIC

Hi @meyay I tested the solution in the topic you shared that worked. Thanks a lot for sharing that first of all.

The other solution pihole I could not test because it’s kind of complex than the above solution and also it had a blocker that it supports only some distros so don’t know about this solution.

So, I just want to explain what I think about the first solution. When we try to add --cap-add in the docker run it will try to add capability but the user running inside will be non-root so will not get the capability. But when you add that setcap in the .dockerfile what happens is the docker built is run by a root account or user which can set the capability for the container that could be a specific command like chown or an executable like python. So, using this solution you can solve the problem of not running the container as root but still give a specific privilege to a process or whatever.

Btw thanks all for all the replies.

1 Like