Skip to content

Support adding capabilities to docker services using cap_add

Description

I am trying to set up docker-in-docker using user namespace isolation instead of privileged mode. For this to work the docker-in-docker service must be started with the capabilities SYS_ADMIN, NET_ADMIN and SYS_PTRACE. Unfortunately the cap_add (and cap_drop) options only apply to the main docker container, and not to service containers that are created.

Proposal

cap_add and cap_drop should be used when creating services as well.

Links to related issues and merge requests / references