Files
davidpaulyoung/content/post/2018-02-09-docker-without-sudo.md
2026-05-14 14:06:21 -06:00

776 B

layout, title, subtitle, description, excerpt, date, author, image, publishDate, showtoc, tags, URL, categories
layout title subtitle description excerpt date author image publishDate showtoc tags URL categories
post 如何使用非root用户执行docker命令 如何使用非root用户执行docker命令 如何使用非root用户执行docker命令 2018-02-09 10:00:00 赵化冰 /img/docker.jpg 2018-02-09 10:00:00 false
Tips
Docker
/2018/02/09/docker-without-sudo/
Tips

Add the docker group if it doesn't already exist:

sudo groupadd docker

Add the connected user "$USER" to the docker group. Change the user name to match your preferred user if you do not want to use your current user:

sudo gpasswd -a $USER docker

Either do a newgrp docker or log out/in to activate the changes to groups.