I have to add some rule to iptables
, in the build process it give me an error because i need privilege
so is there any way to get around it,
i know that there no privilege
option in build
, or can i build and image without run it ?
It's considered better practice from what I understand to use specific kernel capabilities:
docker run --cap-add NET_ADMIN <image> <command>
should get you what you need. You may need to also add SYS_ADMIN
as well.
-
4
-
-
1As a follow-up, see this thread for more information on the status of this feature: github.com/moby/moby/issues/1916 – Patrick Mar 13 '18 at 13:10