User Tools

Site Tools


docker:allow_docker_to_be_run_without_using_sudo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker:allow_docker_to_be_run_without_using_sudo [2025/05/20 15:36] peterdocker:allow_docker_to_be_run_without_using_sudo [2025/05/20 15:39] (current) peter
Line 39: Line 39:
 sudo usermod -aG docker peter sudo usermod -aG docker peter
 </code> </code>
 +
 +<WRAP info>
 +**NOTE:**  Any user can be added to the docker group as required.
 +</WRAP>
 +
 +
 +----
  
 ==== Enable this functionality ==== ==== Enable this functionality ====
Line 45: Line 52:
 newgrp docker newgrp docker
 </code> </code>
 +
 +----
 +
 +===== Verify that docker commands can be run without sudo =====
 +
 +<code bash>
 +docker run hello-world
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  If an error is seen such as **docker: Got permission denied while trying to connect to the Docker daemon socket**, then:
 +
 +<code bash>
 +sudo chmod 666 /var/run/docker.sock
 +</code>
 +
 +</WRAP>
  
 ---- ----
  
  
docker/allow_docker_to_be_run_without_using_sudo.1747755395.txt.gz · Last modified: 2025/05/20 15:36 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki