You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
What would you like to be documented:
In README file under Installation and usage, there might be a need to add a note for the requirement of running docker as a non root user (running without sudo).
Good idea to add a link too.
Why is this needed:
As a new user when I was trying to run kind create cluster, I got an error "Error: could not list clusters: invalid output when listing nodes: WARNING: Error loading config file: /home/necuser/.docker/config.json: open /home/necuser/.docker/config.json: permission denied" and thus get a little confusing.
The text was updated successfully, but these errors were encountered:
Technically kind needs to run as any user that has access to the docker socket, which may or may not be root depending on how you install docker. This is also true if using the docker CLI or other tools though.
@BenTheElder Thanks for replying. I am not well aware of how to run docker without binding to UNIX socket, but feel this might be the most common way of installation. So maybe this will be a nice addition in README file.
I saw your comment in the PR and thought maybe adding it here too will help.
I am not well aware of how to run Docker without binding to UNIX socket, but feel this might be the most common way of installation.
You definitely normally run it on a UNIX socket (can also be remote / TCP though), however a couple points / clarifications:
It's not about root / not-root users, it's about being a user with permission to the socket when executing kind or docker, which on Linux is typically the dockergroup, which very likely includes the root user, but technically depends on your specific installation of Docker.
On macOS / Windows this is a pretty much a non-issue, on Linux the upstream Docker installation docs document this:
If you would like to use Docker as a non-root user, you should now consider adding your user to the “docker” group with something like:
sudo usermod -aG docker your-user
kind has the same requirements to run as docker which I wouldn't expect to be surprising? If docker ps requires sudo docker ps to succeed on a system then kind requires sudo kind.
I don't feel the repo README is quite the correct place to bring this up, as we also don't get into docker installation details and I haven't seen any comparable docker tooling (including say, docker itself) discuss this there.
I do think this at least belongs in the known-issue guide however. 😅