Linux capabilities

Separate pieces of root power, such as binding low ports or changing file owners, that can be granted or removed one by one.

In more detail

Docker gives containers a reduced default set. Hardened services drop every capability and add back only what they need, for example CAP_NET_BIND_SERVICE to listen on port 80. Adding CAP_SYS_ADMIN is close to giving full root.

Example

docker run --cap-drop ALL --cap-add NET_BIND_SERVICE taskapi:0.1

Related terms

Taught in

References

Certification courses