Posted by : at

Category : docker

Setup docker-ce in ubuntu 16.04

Install using the repository

  1. Update the apt package index
$ sudo apt-get update 
  1. Install packages to allow apt to use a repository over HTTPS:
$ sudo apt-get install \
       apt-transport-https \ 
       ca-certificates \ 
       curl \
  1. Add Docker’s official GPG Key:
$ curl -fsSL | sudo apt-key add -
  1. Verify that now that the key with the fingerprint
$ sudo apt-key fingerprint 0EBFCD88

  1. Setup the stable repository
$ sudo add-apt-repository \
   "deb [arch=amd64] \
   $(lsb_release -cs) \
  1. Install docker ce
$ sudo apt-get update 
$ sudo apt-get install docker-ce 

7.Run docker

$ sudo docker run hello-world 

This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.

This means you have finally installed Docker in your pc locally.