Saturday, June 17, 2017

Docker Installation in Ubuntu 16.4


First of All , this is not the special guide which will tell you something more about the Docker installation procedure compare to procedure which you can find it on other sites.

the purpose of this post is easy access for me and my colleagues at one site.

If the google takes you here , you don't have to search for better guide than this. Smile.


Alright lets jump to the installation.

Open a terminal and start executing the commands.

1.  Adding GPG Key of Official Docker repository to your local system

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

2.  Adding Docker repository to APT sources.

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

3.  lets make the Docker repository to reflect into local repo

       $ sudo apt-get update

4.  lets install Docker repo

       $ apt-cache policy docker-ce


     you will see like the below output : the version numbers may vary

image


5. installing Docker

     $  sudo apt-get install -y docker-ce

     wait until the Docker installation process completes.

6. verify  Docker service status

    $ sudo systemctl status Docker

     you should see active (running ) like the below

image


7. verify the Docker installed in your system.

  $ sudo Docker info                   ( to get overall information about installed Docker )

  $ sudo Docker version        ( to get only information about the installed Docker version )

  image

Note :

     now you have installed Docker in your local system successfully but all the Docker commands will require root access so you need to use “ sudo “ always before the Docker commands.

If you dont want to type always sudo then you can follow the below one time setup steps :

1. Add your current username into Docker group which will be created by default during the installation.

        $ sudo usermod –aG docker  ${user}

        or

         if you want to add other user in to docker group follow the below command

         $ sudo usermod –aG docker <username>

2.  apply new group membership

       $ su - ${USER}

            3. verify your account name in the docker group

        $ id -nG

image


Enjoy !

feel free to comment for corrections or questions .

No comments :