Docker Tutorial Part 2 ->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-

installed

  • 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 – gauravtiwari91@yahoo.com

Advertisements

Docker Tutorial Part 1 ->Docker technology overview: How is it different from virtual machines

Before we start blindly follow the docker training program and start learning it. Lets understand why we should learn, why we need it. What this technology is and how it works.

What is Docker – All applications have their own dependencies, which include both software and hardware resources. Docker is an open source platform for developers, QA etc. Its a mechanism that helps in isolating the dependencies per each application by packaging them into a single unit called container. Containers are safe to use and deployed easily compared to previous approaches

How containers are different as a concept – Lets understand the difference by an analogy. Consider your virtual machine as a house and container as an apartment.

Houses (Virtual machines) are fully self-contained which has its own infrastructure- plumbing, electricity, water supply etc. On a majority all house would have at least a bedroom, living area, bathroom and kitchen. Still, even if I am trying to bought a house with only a room, I would end up buying more than what i need in a house.

Apartments (The containers) are built around shared infrastructure. The apartment building (Docker host) shares plumbing, electricity, water supply etc. They are also offered in different sizes as per your need. You also have to pay for only those services which you want to use.

Also maintenance cost for house will always be higher than an apartment.

So with containers, you share the underlying resource of the Docker host and use only the software which you need to run your application.

And with virtual machines- its just opposite, you are going to have full operating systems and default programs comes with it.

Now when we have understand the concept, lets go a little technical. Consider the building as docker-host and builder as docker-engine in below explaination-

Docker containers versus Virtual Machines – Virtual machines have full OS with its own memory management with the overhead of virtual device drivers. In an virtual machine, valuable resources are emulated for the guest OS and Hypervisor, which makes it possible to run many instances of one or more operating systems in parallel on a single machine

While Docker containers are executed with Docker engine rather than a Hypervisor, therefore containers are smaller than virtual machines and enable faster startup and better performance, great compatibility due to sharing of the host’s kernel. Architecture level visual difference is as below – containersvsVM

So to optimize our SDLC and reduce time spent in test script execution,overhead of maintaining the execution/deployment environments, We should really go for container technology.

Now we know what docker is and why we should use it. To know more in details and for personal / corporate trainings please reach out to – gauravtiwari91@yahoo.com