docker-library / docker

Docker Official Image packaging for Docker
Apache License 2.0
1.09k stars 568 forks source link

Docker Requires "sudo" on Ubuntu version 22.04.1 LTS #497

Closed novaTopFlex closed 1 month ago

novaTopFlex commented 1 month ago

Output from uname -a

Linux ubuntu-macbookpro 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 10:22:43 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

I am not sure how the Linux distribution forces me to use sudo to activate Docker, and I have tested other distributions for which Docker does not require the sudo command. I am currently unsure how to pinpoint the error.

whalelines commented 1 month ago

This repository contains the source for the docker Docker Official Image, https://hub.docker.com/_/docker, and is not a general resource for running Docker.

You can ask for help in the Docker Community Slack. If you are not already a member of the Docker Community Slack, you can use this link to join. You can find more support options at Docker Support.

When you do ask for help, I would recommend including more detail about what you are trying to do, what commands you are running, and what errors are being reported.

In this case, perhaps you need to add your Ubuntu user to the docker group.

$ sudo usermod -a -G docker USER

Good luck!

tianon commented 1 month ago

See also https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user, especially the note about access to Docker being the same as root access on the host. :bow: