Firstly update ubuntu repository by running following command
sudo apt-get update -y && sudo apt-get upgrade -y
Now install packages pt-transport-https, software-properties-common and ca-certificates
sudo apt-get install apt-transport-https software-properties-common ca-certificates -y
Now get the gpg key
wget https://download.docker.com/linux/ubuntu/gpg && sudo apt-key add gpg
Add docker repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
If the above step succeded, you are good to install docker
sudo apt-get install docker-ce -y
Once the installation completed, you may need to start docker service.
sudo systemctl start docker && sudo systemctl enable docker
To run docker without sudo, you will need to create a user for docker and add the users into that group
sudo groupadd docker && sudo usermod -aG docker dockeruser
The user ubuntu will be able to run docker commands without sudo now.
For rhel based OS, use the following commands to install and start docker.
yum install -y docker-io
service docker start
Wow because this is excellent work! Congrats and keep it up.
Many thanks really useful. Will share website with my friends.