moby: setcap is not supported in Docker?
Here is the problem,
root@25ef774c3905:/home/vcap# setcap cap_net_bind_service=+ep /tmp/setcaptest
Failed to set capabilities on file `/tmp/setcaptest' (Operation not supported)
OS type of my container is Ubuntu 10.04.4 LTS run with --privileged
, and it’s running on:
Linux 25ef774c3905 3.8.0-38-generic #56~precise1-Ubuntu SMP Thu Mar 13 16:22:48 UTC 2014 x86_64 GNU/Linux
I also tried Ubuntu12.04 container, it reports the same error, so is it true that Docker dose not support setcap command yet?
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 24 (18 by maintainers)
Links to this issue
Commits related to this issue
- Skip setcap on docker. See docker/docker#5650 — committed to hsheth2/gonet by hsheth2 8 years ago
I used https://github.com/scionproto/docker-caps
@CsterKuroi the version of aufs on Ubuntu 14.04 / kernel 3.13 is probably too old. You can try switching to their newer kernels; Ubuntu 14.04.5 also allows you to run with kernel 4.4; https://wiki.ubuntu.com/Kernel/Support
I tested this on Ubuntu 16.04, and looks to work there;