User Tools

Site Tools


docker:install_docker

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:install_docker [2020/07/15 09:30] – external edit 127.0.0.1docker:install_docker [2025/05/20 15:43] (current) peter
Line 35: Line 35:
  
 <code bash> <code bash>
-apt install -y docker.io+sudo apt install -y docker.io
 </code> </code>
  
Line 42: Line 42:
 ---- ----
  
-Then you can start Docker with the systemctl command:+===== Add your user to the docker group ===== 
 + 
 +<code bash> 
 +sudo usermod -aG docker $USER 
 +</code> 
 + 
 +<WRAP info> 
 +**NOTE:**  This allows docker to be run without using sudo. 
 + 
 +To enable this functionality, log out and log back in; or run: <code bash> 
 +newgrp docker 
 +</code> 
 + 
 +</WRAP> 
 + 
 +---- 
 + 
 +===== Verify that you can run docker commands 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> 
 + 
 + 
 +---- 
 + 
 +===== Start Docker =====
  
 <code bash> <code bash>
Line 50: Line 85:
 ---- ----
  
-Enable docker to run at system boot:+===== Enable docker to run at system boot =====
  
 <code bash> <code bash>
Line 58: Line 93:
 ---- ----
  
-You might also want to check the docker version:+===== Check the docker version =====
  
 <code bash> <code bash>
Line 66: Line 101:
 Show the currently installed Docker version. Show the currently installed Docker version.
  
-Now docker is installed in your system.+---- 
 + 
 +<WRAP info> 
 +**NOTE:**  docker is now installed
 + 
 +  * A container can now be started by downloading a Docker Image from the Docker Registry.
  
-You can start making a container by downloading a Docker Image from the Docker Registry.+</WRAP>
  
docker/install_docker.1594805433.txt.gz · Last modified: 2020/07/15 09:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki