====== Docker - Install Docker ====== ===== Check the kernel version and the OS architecture ===== Run **uname -a** to check the version of the currently running Linux kernel: uname -a Check that it's a 64Bit Kernel (x86_64). Docker won't work without this. ---- Check the Ubuntu version. cat /etc/lsb-release The command shows that the Ubuntu version is 16.04. ---- It is recommended to update Ubuntu before you install new software. Run the following command to fetch the latest updates from the Ubuntu repository and install them. sudo apt update sudo upgrade ---- Now install docker with the apt command: sudo apt install -y docker.io Wait until the installation has been completed. ---- ===== Add your user to the docker group ===== sudo usermod -aG docker $USER **NOTE:** This allows docker to be run without using sudo. To enable this functionality, log out and log back in; or run: newgrp docker ---- ===== Verify that you can run docker commands without sudo ===== docker run hello-world **NOTE:** If an error is seen such as **docker: Got permission denied while trying to connect to the Docker daemon socket**, then: sudo chmod 666 /var/run/docker.sock ---- ===== Start Docker ===== systemctl start docker ---- ===== Enable docker to run at system boot ===== systemctl enable docker ---- ===== Check the docker version ===== docker version Show the currently installed Docker version. ---- **NOTE:** docker is now installed. * A container can now be started by downloading a Docker Image from the Docker Registry.