Categories
How To Linux Server

🐳 How to install docker on any Ubuntu ….

…lets talk about a different kind of docking, If you spend any time at all around developing software or on Linux systems you will inevitably need to install docker (a real life saver indeed), thanks to Ubuntu installing is a breeze.

This was tested on Ubuntu 18.04 but will work on all versions due to the nerdy magic use of ✨$(lsb_release -cs)✨ !

Lets start with a quick update:
sudo apt update
sudo apt upgrade

Now we can get the system ready by installing the required packages:
sudo apt-get install curl apt-transport-https ca-certificates software-properties-common

Now that we are all ready we can add the Docker repositories, start by adding the GPG key, like so:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Now time to add the actual repository and do a final update (I know your attention span is short we are almost done…):
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update

Finally hey! Now we can Install with the following command !!
sudo apt install docker-ce

And to check all is ok….
sudo systemctl status docker

Congratulations Now all is ok .
But one final task to insure it works as intended (without sudo) and that is add your current user to the docker user group otherwise you will get errors like “Permission Denied when not sudo docker“, to fix this run the commands:
sudo group add docker
sudo usermod -aG docker $USER
newgrp docker
docker run hello-world

A container based software distribution utility
A container based software distribution utility

🐋 🐳Do not look up docking on urban dictionary….🐳 🐋

By Ben Potter

Follow me in my online money making adventures ! We may just succeed...

Leave a Reply

Your email address will not be published. Required fields are marked *