Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document why we require root to run this #8

Open
consideRatio opened this issue Sep 14, 2021 · 4 comments
Open

Document why we require root to run this #8

consideRatio opened this issue Sep 14, 2021 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@consideRatio
Copy link
Member

consideRatio commented Sep 14, 2021

Our Dockerfile runs the script as root, we shouldn't.

But, maybe we must? I'm not sure. Are we expected to run this container with a mounted docker socket that requires us to run as root or something?

@consideRatio consideRatio changed the title Don't run as root Can we not run as root ? Sep 14, 2021
@yuvipanda
Copy link
Collaborator

Nope, we can run as non-root as long as the docker socket is accessible. Access to the docker socket does make us 'root equivalent' though. We might have to belong to the 'docker' group maybe? I don't know what permissions bind mounted docker socket usually has

@consideRatio consideRatio added documentation Improvements or additions to documentation and removed maintenance labels Sep 15, 2021
@consideRatio
Copy link
Member Author

This can probably then be closed by documenting in #7, as we may require being root.

. Access to the docker socket does make us 'root equivalent' though.

Does it matter if the docker socket is exposed via another Pod, a daemonset on the node, rather than being directly installed on the node? Or is it? Hmm... I'm very vague about these matters and would love to acquire some overview about this.

@minrk
Copy link
Member

minrk commented Mar 15, 2022

It needs access to the docker socket and access to measure disk usage (~du -hs /var/lib/docker). This usually requires root.

@consideRatio consideRatio changed the title Can we not run as root ? Document why we require root to run this Mar 15, 2022
@manics
Copy link
Member

manics commented Jun 15, 2022

Does it matter if the docker socket is exposed via another Pod, a daemonset on the node, rather than being directly installed on the node?

It's a unix or network socket. It doesn't matter who it's owned by, if you're allowed to connect to it you can run any Docker command, which means you've effectively got administrative control of the Docker host (this is one of the issues rootless Docker or Podman solve).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants