0

I'm getting this error while running "ifconfig" command in my CentOS 7 container

The error i get is

cannot open /proc/net/dev (Permission Denied)

how to solve this..??? I'm getting this problem in my each container. I give full permission to /proc/net/dev but it's not working

Tarun Lalwani
  • 142,312
  • 9
  • 204
  • 265
pankaj
  • 85
  • 1
  • 8

1 Answers1

0

Without knowing your docker run ... command line it is hard to guess but maybe you will like to add --cap-add=NET_ADMIN to your run command.

From here:

For interacting with the network stack, instead of using --privileged they should use --cap-add=NET_ADMIN to modify the network interfaces.
m4r10k
  • 1,087
  • 8
  • 8