Docker setup and installation on Ubuntu

Installing docker on Linux is as simple as installing any other Linux package, We don’t require the whole Docker toolbox for working with docker on Linux.

In this blog post, I will be talking about installing community edition installation of Docker.

To install Docker, you need the 64 bit version of either one of below Ubuntu-

  • Xenial 16.04 (LTS)
  • Trusty 14.04 (LTS)
  • Yakkety  16.10

Uninstall older version of Docker – Older version of Docker called docker or docker-engine. if you have these then uninstall them, otherwise skip this part

sudo apt-get remove docker docker-engine

Install Docker – You can install the Docker in different ways, as per your needs

  1. Setup docker repositories and install from them – this is easy in installation and upgrades (recommended approach)
  2. Download the DEB package and install it manually and also manage upgrades manually (prefer when lack of internet access)

Install using Repository – If you are doing the setup for the first time on a new host machine, you need to setup the docker repository. Then you can use the same repository for install and updates

  • Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
  • Add Docker’s official GPG key :
curl -fsSL | sudo apt-key add -
  • Verify that the key fingerprint is 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
sudo apt-key fingerprint 0EBFCD88

pub   4096R/0EBFCD88 2017-02-22
      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid                  Docker Release (CE deb) <>
sub   4096R/F273FCD8 2017-02-22
  • use the below command to setup the stable repository
sudo add-apt-repository \
   "deb [arch=amd64] \
   $(lsb_release -cs) \
  • Update the apt package
sudo apt-get update
  • Install the latest / specific version of Docker with below commands
sudo apt-get install docker-ce   //for latest version
sudo apt-get install docker-ce=  //for specific version
  • Verify that Docker CE is installed correctly by running a sample hello-world docker image-
sudo docker run hello-world
  • You should see something like below if your installation is successful and complete


If you guys face issues in installation , please mention in comments section.

In the next blog post , we would be learning docker terminology and different docker components

To know more in details, hands-on and for personal / corporate training please reach out to –

Getting started with Docker: Setup and Installation on Windows

Now we have the basic understanding of docker technology, lets go ahead and do the installations. if you are still not aware about it, please go back and read my post Docker technology overview: How is it different from virtual machines and come back here.

Please make sure virtualization is enabled in your Windows system and follow below steps to install Docker toolbox on Windows-

  • Click on the link and download docker toolbox from – Get Docker Toolbox for Windows
  • Docker toolbox will include following docker tools – (Don’t worry, we will cover each of them in upcoming blog posts)-
  1. Docker CLI client for running Docker Engine to create images and containers
  2. Docker Machine for running Docker Engine commands from Windows terminal
  3. Docker Compose for running docker-compose command
  4. Docker Kinematic – ( Docker GUI – for interactive docker operations)
  5. Oracle VM Virtual box
  6. Git MSYS-git UNIX tools
  • Docker Engine uses Linux-specific kernel features, we can’t run Docker Engine natively on Windows. (So indirectly you will be creating containers inside a small Linux VM running in the Oracle virtual box). The new Docker for Windows uses native virtualization and does not need Virtual box to run docker. (lets stick to this as of now for learning purpose)
  • Install the executable which you downloaded in first step. double click and keep following installation instructions. Once you done with installation, you will see below icons on your desktop-


  • Click on the Docker quick start to launch the toolbox terminal. After this if it asks for any permissions, press yes. When its started, you will see a terminal displays $ prompt
  • Now type command docker and you will see all help options for docker as below-

dockerinstallationNow you are good to go and play around docker images and containers. You can give a try to a hello-world docker images. This image checks for your installation and print success message if installation is correct. Type “docker run hello-world” on terminal and hit Enter.

In the next blog post , we will learn about doing setup on Linux environment 🙂

To know more in details, hands-on and for personal / corporate training please reach out to –