11

I am learning Docker, and I quite like it.

However, I don't understand, why does docker need root privileges for making containers, reading logs, and so on.

I have read some articles like this one

https://docs.docker.com/articles/security/

but all I see there is "docker needs root priviledges, because it can have access to root folders". Well, I wouldn't mind running dockers as non-root and give them access only to non-root user-owned folders in the outside system.

Why is that a problem?

8

Some "cool" docker features like port binding, mounting filesystems etc. strictly requires docker.io daemon to be run with super-user privileges.

However, you can use docker command line tool without root privileges if docker.io daemon is listening to a network port or it's unix socket is accessible for user to read and write.

It's a GREAT security violation and should not normally be used.

Additional details about Docker security: https://docs.docker.com/articles/security/

2

According to those links

dockers could not have networking, if it didn't have root priviledges, if I understand it correctly.

I am not sure if that's all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.