Docker Community Forums

Share and learn in the Docker community.

Exiting due to DRV_AS_ROOT: The "docker" driver should not be used with root privileges

[root@centos1 ~]# minikube start
:grinning_face_with_smiling_eyes: minikube v1.22.0 on Centos 8
:sparkles: Automatically selected the docker driver. Other choices: none, ssh
:stop_sign: The “docker” driver should not be used with root privileges.
:bulb: If you are running minikube within a VM, consider using --driver=none:
:blue_book: https://minikube.sigs.k8s.io/docs/drivers/none/

:x: Exiting due to DRV_AS_ROOT: The “docker” driver should not be used with root privileges.

minikube start --force --driver=docker

1 Like

Minikube start is using docker without ‘–driver=’ option.

you need create a user and then add it to docker group.

[root@localhost ~]# grep docker /etc/group
docker:x:992:gitlab-runner
[root@localhost ~]# adduser -g 992 -c "Docker" docker
[root@localhost ~]# id docker
uid=1000(docker) gid=992(docker) groups=992(docker)	

now, you can launch it.

[root@localhost ~]# su - docker
[docker@localhost ~]$ minikube start --memory=max --cpus=max  \
> --image-mirror-country=cn --registry-mirror="https://registry.docker-cn.com,https://docker.mirrors.ustc.edu.cn" \
> --insecure-registry="registry.netkiller.cn" 
😄  minikube v1.22.0 on Centos 8
✨  Automatically selected the docker driver
❗  Your cgroup does not allow setting memory.
    ▪ More information: https://docs.docker.com/engine/install/linux-postinstall/#your-kernel-does-not-support-cgroup-swap-limit-capabilities
🎉  minikube 1.24.0 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.24.0

💡  To disable this notice, run: 'minikube config set WantUpdateNotification false'

🧯  The requested memory allocation of 7694MiB does not leave room for system overhead (total system memory: 7694MiB). You may face stability issues.
💡  Suggestion: Start minikube with less memory allocated: 'minikube start --memory=2200mb'

✅  Using image repository registry.cn-hangzhou.aliyuncs.com/google_containers
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
❗  The image 'registry.cn-hangzhou.aliyuncs.com/google_containers/coredns/coredns:v1.8.0' was not found; unable to add it to cache.
    > registry.cn-hangzhou.aliyun...: 332.67 MiB / 361.09 MiB  92.13% 517.54 Ki

thank you very much !!!