Minikube: add support for rootless docker

Created on 15 May 2020  ·  9Comments  ·  Source: kubernetes/minikube

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

cdocker-driver help wanted kindocumentation prioritbacklog

Most helpful comment

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.

All 9 comments

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...

This could be documented better: #7963

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

@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)

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

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.

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.

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

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.

Was this page helpful?
0 / 5 - 0 ratings