Re:Inside Docker's “FROM scratch”
by rmoriz on Monday November 27, 2017 @05:33AM
(#15786323)
Massive downside: You run your app as root or you have to do nasty mounts of /etc/passwd and /etc/group from your host
[ Parent
| on HN ]
You don't have to mount the host versions - you can create container-specific ones.
See https://medium.com/@lizrice/non-privileged-containers-based-...
Re:Inside Docker's “FROM scratch”
by Intermernet on Monday November 27, 2017 @05:44AM
(#15786368)
You can run a Docker container as a particular user.
https://docs.docker.com/engine/reference/builder/#user
You can use `setcap` to grant capabilities to the binary or the `pam_cap` module if you need to do capabilities per user.
I haven't run across the need to run most containers as root for a while now.