useful image

let’s install Docker

Step 1: Update Local Database Update the local database with the command:

sudo apt-get update

Step 2: Download Dependencies You’ll need to run these commands to allow your operating system to access the Docker repositories over HTTPS.

In the terminal window, type:

tinix@yandex:/$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

To clarify, here’s a brief breakdown of each command:

  • apt-transport-https: Allows the package manager to transfer files and data over https
  • ca-certificates: Allows the system (and web browser) to check security certificates
  • curl: This is a tool for transferring data
  • software-properties-common: Adds scripts for managing software

Step 3: Add Docker’s GPG Key The GPG key is a security feature.

To ensure that the software you’re installing is authentic, enter:

tinix@yandex:/$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Add the repository

tinix@yandex:/$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Update again

tinix@yandex:/$ sudo apt-get update

install docker

 tinix@yandex:/$ sudo apt-get install docker-ce

start with the system

tinix@yandex:/$ sudo systemctl enable docker

add new user

for example check you user

tinix@yandex:/$ whoami
tinix
$ sudo usermod -aG docker tinix

leave session

tinix@yandex:/$ exit

start again with the new user and check

tinix@yandex:/$ docker run hello-world

that’s all folks..!!


comments powered by Disqus