EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login

Install Docker

By Priya PedamkarPriya Pedamkar

Home » Software Development » Software Development Tutorials » Docker Tutorial » Install Docker

Install Docker

How to Install Docker?

In this post, we are going to look at all the necessary steps that are needed to install Docker. But before we come to that, it is important to let you know the editions that are available:

  1. Community Edition (CE)
  2. Enterprise Edition (EE)

While the Community Edition Docker is a free Docker platform and is mostly suited for individual developers and small organizations, the Enterprise Edition Docker comes with licensing cost and is suitable for business-critical production apps. The Enterprise Edition comes with additional enterprise features such as Image Management, added security, container app management, etc.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

In this article, we will be discussing the installation steps for Docker CE on Linux as well as Windows Operating Systems.

Steps to Install Docker CE on Linux

Following are some steps to install docker CE on linux:

Test Dicker Working

Source: https://www.google.co.in/imgres

For our tutorial, we will be using the Ubuntu distribution of Linux Operating System. However, shall you wish to install it on other Linux distributions, we will be providing the links for the same at the end of the article.

  1. One of the prerequisites of installing Docker is to have Linux Kernel version of 3.8 and higher. To check the same, please run the following command:

name -a

Output:

Docker Installation step 1

An account on Docker Hub is also needed if you want to create your own images and thereby pushing them to Docker Hub.

  1. OS should be updated with the latest packages.

sudo apt-get update

Output:

updated latest packages

The “sudo” command ensures you to have the root access.

Popular Course in this category
Docker Training (4 Courses, 3 Projects)4 Online Courses | 3 Hands-on Projects | 11+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.5 (4,831 ratings)
Course Price

View Course

Related Courses
Python Training Program (36 Courses, 13+ Projects)All in One Software Development Bundle (600+ Courses, 50+ projects)
  1. Now we will download all the necessary certificates that are prerequisite before installing Docker.

sudo apt-get install apt-transport-https ca-certificates

Output:

Docker Installation step 3

  1. We must also ensure that the data is encrypted while we download the packages for Docker. This can be done by adding the GNU Privacy Guard key or GPG key.

sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 -- recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Output:

encryption of data

This key is specific which is used to download the necessary Docker Packages.

The pool hkp://p80.pool.sks-keyservers.net is a subset of servers which are also available on port 80. It’s more friendly to firewalls and companies.

  1. Now you might be having different Ubuntu versions, in that case, you are required to register your version on Docker list so that apt package manager is able to detect the Docker packages and it gets downloaded
    It can be found on the following the link:

Let’s try for our version which is Ubuntu trusty main,

Command:

echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main” | sudo tee /etc/apt/sources.list.d/docker.list

  1. Now we will execute apt-get update command to update the packages on the Ubuntu system as we had done previously.
  2. Please check if the package manager is pointing to the right repository. We can do it by executing the below command:apt-cache policy docker-engine
  3. Also for Ubuntu Trusty, Wily, and Xenial, we have to install the Linux-image-extra-* kernel packages, which allows one to use the aufs storage driver. This driver is used by the newer versions of Docker.

It can be done by using the following command:

sudo apt-get install Linux-image-extra-$(uname -r) Linux-image-extra-virtual

  1. Finally, it is the time to install Docker and it can be done with the help of the following command:

sudo apt-get update && sudo apt-get install docker-ce -y

Docker Installation step 9

  1. Now when the Docker is installed, we can check a couple of things like the Docker version, Docker Info, etc. For checking the Docker version, we can make use of Docker utility provided by Docker. Command:

docker version or docker info

Docker Installation step 10

To get more information about the Docker that is running on your system, you can execute the following command:

docker info

This command returns detailed information about the Docker service that is installed.

Docker Installation step 10-2

How to Install Dockers on Windows

  • Docker for windows can be downloaded at https://docs.docker.com/docker-for-windows/
  • If you have an older version of windows (such as Windows 7 and Windows 8.1), you are required to install Docker Toolbox. You can download Docker Toolbox from here.
  • Once the exe installer is downloaded, run it and agree to its licenses if you have installed Windows 10, or if you have installed Docker toolbox for previous versions, then simply click on next as shown below:

Docker Toolbox setup wizard

  • Once installation gets processed, click on the finish button and launch the Docker.
  • Now coming to older versions of windows, let us see how we can install Docker Toolbox
  • Download the installer from https://www.docker.com/products/docker-desktop and run it, accept the license and click on next.
  • Please choose the destination folder for Docker Toolbox installation; you can leave this path as the default one. Then click on next.

Select Destination location for docker toolbox

  • For the rest of the screens, please select the default options and click on next.

Select Components

  • Finally, click on the install button and the Docker Toolbox will get installed on your windows machine

Install Docker Toolbox

  • Once it gets installed, please launch it. You will be prompted to a Docker Shell. In order to run any Docker command, you can run it by giving docker run. For e.g. docker run image

Image command will run the container

Also, as discussed, below are the useful links which will help you to install Docker CE if you are using any other Linux distributions apart from Ubuntu.

  1. https://docs.docker.com/install/
  2. Docker CE installation on CentOS
  3. Docker CE installation on Debian
  4. Docker CE installation on Fedora
  5. Docker CE installation on Mac

Recommended Articles

This has been a guide on How to Install Docker. Here we have discussed the basic concept and steps to install Docker on Linux and Windows respectively. You may also look at the following articles to learn more –

  1. Install Drupal 8
  2. Install Ansible
  3. Install Kubernetes
  4. Install CentOS

Docker Training (4 Courses)

4 Online Courses

3 Hands-on Projects

11+ Hours

Verifiable Certificate of Completion

Lifetime Access

Learn More

0 Shares
Share
Tweet
Share
Primary Sidebar
Docker Tutorial
  • Docker
    • What is Docker in Linux
    • Docker Architecture
    • Install Docker
    • Advantages of Docker
    • Docker Commands
    • Docker Toolbox
    • Docker Storage Drivers
    • Docker Push
    • Docker run Command
    • Dockerfile
    • Docker Containers
    • Docker Container Linking
    • Docker Stop Container
    • Docker List Containers
    • Docker Registry
    • Docker Volume
    • Docker Images
    • Docker Export
    • Docker Import
    • Docker Systemd
    • Docker Stack
    • Docker Privileged
    • Docker Pull
    • Docker ENTRYPOINT
    • Docker Start
    • Docker system prune
    • Docker Hosts
    • Docker Logging
    • Docker Save
    • Docker Commands Cheat Sheet
  • Docker Swarm
    • What is Docker Swarm
    • Docker Swarm Architecture
  • Interview Questions
    • Docker Interview Questions

Related Courses

Docker Training Course

Python Training Course

Software Development Course Training

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

© 2020 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA Login

Forgot Password?

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you
Book Your One Instructor : One Learner Free Class

Let’s Get Started

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

Special Offer - Docker Training (4 Courses) Learn More