Just beware that adding a user to the `docker` group is tantamount to
adding them to `sudoers` with `!authenticate`. In other words, if the
user account is compromised, the whole machine is too. If this is a
personal computer or a VM (as opposed to an account on a shared
server) that may be tolerable since there is probably nothing of any
value on the machine that only `root` could access.
But yes, Jenkins Docker features generally assume that either the
Jenkins master account or the account used to run an agent process
(depending on the feature) have unrestricted access to some Docker
daemon, meaning they are effectively root on whatever OS instance is
running that daemon.
Mark:
> It is less dangerous to allow the agent user to run docker than to allow the agent user to use sudo to become root.
Not true, at least in the straightforward case that the Docker daemon
is just listening on a local socket.