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

add support for rootless docker #8157

Closed
dashingsat opened this issue May 15, 2020 · 11 comments
Closed

add support for rootless docker #8157

dashingsat opened this issue May 15, 2020 · 11 comments
Labels
co/docker-driver Issues related to kubernetes in container help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@dashingsat
Copy link

Hello,
I am trying to run minikube using docker driver in rootless mode. But minikube is not able to detect the docker daemon.

'docker' driver reported an issue: "docker version --format {{.Server.Os}}-{{.Server.Version}}" exit status 1: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

The docker host env is set to export DOCKER_HOST=unix:///run/user/1000/docker.sock

@afbjorklund
Copy link
Collaborator

Minikube currently runs privileged containers and requires root, both for docker and for podman (with sudo). It nests a runtime inside

Running rootless would be a nice feature for the future, but for now you have to look into the “usernetes” project instead...

@afbjorklund afbjorklund added co/docker-driver Issues related to kubernetes in container kind/support Categorizes issue or PR as a support question. labels May 15, 2020
@afbjorklund
Copy link
Collaborator

This could be documented better: #7963

@afbjorklund afbjorklund added the kind/documentation Categorizes issue or PR as related to documentation. label May 15, 2020
@9kranti
Copy link

9kranti commented May 15, 2020

Do you run any docker command in rootless mode or with sudo applied on the start?

@afbjorklund
Copy link
Collaborator

@9kranti : this is docker rootless mode: https://docs.docker.com/engine/security/rootless/

It is very similar to just running podman, i.e not using sudo podman (or podman-remote)

@9kranti
Copy link

9kranti commented May 15, 2020

docker might need to grant privileges as root user

$ sudo groupadd docker
$ sudo usermod -aG docker $USER

Then turn off your system and then turn on

@afbjorklund
Copy link
Collaborator

docker might need to grant privileges as root user

That is the standard ("rootful" or whatever) docker, not the rootless we are talking about here.

@afbjorklund
Copy link
Collaborator

Here is the link to "usernetes": https://github.com/rootless-containers/usernetes

It is not something that is supported by minikube or the standard kubernetes (yet?)


Note that the "docker" driver in minikube actually runs docker-in-docker.

It is the "none" driver that talks directly to the local docker on the host.

@medyagh medyagh changed the title Not able to connect to docker when running in rootless mode add support for rootless docker May 28, 2020
@medyagh
Copy link
Member

medyagh commented May 28, 2020

minikube does not currently support rootless docker, but I am open to anyone who would like to make a PR

@medyagh medyagh added priority/backlog Higher priority than priority/awaiting-more-evidence. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed kind/support Categorizes issue or PR as a support question. labels May 28, 2020
@priyawadhwa
Copy link

Hey @dashingsat -- until kubernetes supports running in rootless docker, minikube probably won't be able to as well. I'm going to close this issue for now since this isn't something we'll be able to support in the foreseeable future.

@AkihiroSuda
Copy link
Member

kind is going to support running vanilla Kubernetes inside rootless Docker: kubernetes-sigs/kind#1935

Should be easily portable to minikube.

@priyawadhwa Could you reopen this issue?

@afbjorklund afbjorklund reopened this Mar 8, 2021
@afbjorklund afbjorklund added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/documentation Categorizes issue or PR as related to documentation. labels Mar 8, 2021
@afbjorklund
Copy link
Collaborator

@AkihiroSuda : seems that we are already tracking this in #9495

@afbjorklund afbjorklund added the triage/duplicate Indicates an issue is a duplicate of other open issue. label Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

6 participants