Docker vs Virtual Machine

Hi readers,

I have already published 1 blog regarding docker.

Today I am going to tell you difference between Docker and Viertual Machine(VM)

The main difference between docker and vm is their architecture.

In vm hypervisor plays very important role.

On top of hardware level it have hypervisor.

Hypervisor distributes the guest os and however os are there we can have that much applications. With each different os we have different kernels.

But in case of docker-

Lxc plays very imp role.

Lxc is basically linux container, is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel. (in vm concepts we should have different kernel for different os, this is main imp difference)


Lxc is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel.

The Linux kernel provides the cgroups functionality that allows limitation and prioritization of resources (CPU, memory, block I/O, network, etc.) without the need for starting any virtual machines, and also namespace isolation functionality that allows complete isolation of an applications’ view of the operating environment, including process trees, networking, user IDs and mounted file systems.[3]

LXC combines the kernel’s cgroups and support for isolated namespaces to provide an isolated environment for applications. Docker can also use LXC as one of its execution drivers, enabling image management and providing deployment services.




Useful networking linux commands

Hi readers,

I have talking about cloud, OpenStack for this block readers.

To earn more knowledge about cloud and OpenStack you have to have good knowledge of networking.

Following are the basic networking commands for the linux which you must aware about.


ifconfig –

fconfig (interface configurator) command is use to initialize an interface, assign IP Address to interface and enable or disable interface on demand. With this command you can view IP Address and Hardware / MAC address assign to interface and also MTU (Maximum transmission unit) size.


ifconfig interface –

e.g.  ifconfig eth0 –

fconfig with interface (eth0) command only shows specific interface details like IP Address, MAC Address etc. with -a options will display all available interface details if it is disable also.


ping ip address/url –

e.g. ping or ping x.x.x.x –

PING (Packet INternet Groper) command is the best way to test connectivity between two nodes. Whether it is Local Area Network (LAN) or Wide Area Network (WAN). Ping use ICMP (Internet Control Message Protocol) to communicate to other devices



e.g. traceroute ip address

traceroute is a network troubleshooting utility which shows number of hops taken to reach destination also determine packets traveling path. Below we are tracing route to global DNS server IP Address and able to reach destination also shows path of that packet is traveling.



e.g. netstat -tnlp

It is very imp command to check your desired port listing desire services.

Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.



e.g.- dig

Dig (domain information groper) query DNS related information like A Record, CNAME, MX Record etc. This command mainly use to troubleshoot DNS related query.





route command also shows and manipulate ip routing table. To see default routing table in Linux, type the following command.




what is cloud computing in simple words

Hi readers,

Many people talk about cloud computing in detail like virtualization,storage, but very few are able to explain ‘term’ in basic simple words.

Reader of this blog will understand the basic but important concept of cloud computing.


What is Cloud Computing-

It is a type of computing groups of remote servers and

software networks that allow centralized data storage and

online access to computer services or resources.

Using cloud computing we can manipulate,configure and

access the applications online.

Delivery of on-demand computing resources.


what is opensource and it’s Importance

Hi readers,

I can see currently there are many people are talking about opensource, opensource -projects,techniques, functionality, usability.

Only few have the perfect knowledge of the word/world of opensource.

The reader of this blog will have the good knowledge of opensource.

So go through this blog and earn great knowldge of opensource.


Open source refers to a program or software in which the

source code (the form of the program when a programmer

writes a program in a particular programming language) is

available to the general public for use and/or modification from

its original design free of charge

Open source code is typically created as a collaborative effort

in which programmers improve upon the code and share the

changes within the community

Proprietary software is privately owned and controlled. In the

computer industry, proprietary is considered the opposite of

open. A proprietary design or technique is one that is owned

by a company. It also implies that the company has not

divulged specifications that would allow other companies to

duplicate the product

Why to choose open-source





You can be famous

Own product/project

Understanding code of standard

Helping the people who can’t affort costly software


Support option


some open-source projects








Python is an

some basic but imp in python- dir(datatype/varible)

Hi readers,

I am writing this blog  just to convey you, how python is more efficient even you don’t want remember in built functions of the data structure/variable in python.

Lets say a=[1,2,3,4,5]

a is a dictionary.You want to perform some operation using inbuilt function on this list, but you dont know all the in built function related to list.

So, what the reader of this blog do-

he/she should do dir(a)

and he/she will find the list of all the inbuilt functions.


>>> a=[1,2,3,4,5]
>>> a
[1, 2, 3, 4, 5]
>>> dir(a)
[‘__add__’, ‘__class__’, ‘__contains__’, ‘__delattr__’, ‘__delitem__’, ‘__delslice__’, ‘__doc__’, ‘__eq__’, ‘__format__’, ‘__ge__’, ‘__getattribute__’, ‘__getitem__’, ‘__getslice__’, ‘__gt__’, ‘__hash__’, ‘__iadd__’, ‘__imul__’, ‘__init__’, ‘__iter__’, ‘__le__’, ‘__len__’, ‘__lt__’, ‘__mul__’, ‘__ne__’, ‘__new__’, ‘__reduce__’, ‘__reduce_ex__’, ‘__repr__’, ‘__reversed__’, ‘__rmul__’, ‘__setattr__’, ‘__setitem__’, ‘__setslice__’, ‘__sizeof__’, ‘__str__’, ‘__subclasshook__’, ‘append’, ‘count’, ‘extend’, ‘index’, ‘insert’, ‘pop’, ‘remove’, ‘reverse’, ‘sort’]
>>> dir(list)
[‘__add__’, ‘__class__’, ‘__contains__’, ‘__delattr__’, ‘__delitem__’, ‘__delslice__’, ‘__doc__’, ‘__eq__’, ‘__format__’, ‘__ge__’, ‘__getattribute__’, ‘__getitem__’, ‘__getslice__’, ‘__gt__’, ‘__hash__’, ‘__iadd__’, ‘__imul__’, ‘__init__’, ‘__iter__’, ‘__le__’, ‘__len__’, ‘__lt__’, ‘__mul__’, ‘__ne__’, ‘__new__’, ‘__reduce__’, ‘__reduce_ex__’, ‘__repr__’, ‘__reversed__’, ‘__rmul__’, ‘__setattr__’, ‘__setitem__’, ‘__setslice__’, ‘__sizeof__’, ‘__str__’, ‘__subclasshook__’, ‘append’, ‘count’, ‘extend’, ‘index’, ‘insert’, ‘pop’, ‘remove’, ‘reverse’, ‘sort’]
>>> b=1
>>> dir(b)
[‘__abs__’, ‘__add__’, ‘__and__’, ‘__class__’, ‘__cmp__’, ‘__coerce__’, ‘__delattr__’, ‘__div__’, ‘__divmod__’, ‘__doc__’, ‘__float__’, ‘__floordiv__’, ‘__format__’, ‘__getattribute__’, ‘__getnewargs__’, ‘__hash__’, ‘__hex__’, ‘__index__’, ‘__init__’, ‘__int__’, ‘__invert__’, ‘__long__’, ‘__lshift__’, ‘__mod__’, ‘__mul__’, ‘__neg__’, ‘__new__’, ‘__nonzero__’, ‘__oct__’, ‘__or__’, ‘__pos__’, ‘__pow__’, ‘__radd__’, ‘__rand__’, ‘__rdiv__’, ‘__rdivmod__’, ‘__reduce__’, ‘__reduce_ex__’, ‘__repr__’, ‘__rfloordiv__’, ‘__rlshift__’, ‘__rmod__’, ‘__rmul__’, ‘__ror__’, ‘__rpow__’, ‘__rrshift__’, ‘__rshift__’, ‘__rsub__’, ‘__rtruediv__’, ‘__rxor__’, ‘__setattr__’, ‘__sizeof__’, ‘__str__’, ‘__sub__’, ‘__subclasshook__’, ‘__truediv__’, ‘__trunc__’, ‘__xor__’, ‘bit_length’, ‘conjugate’, ‘denominator’, ‘imag’, ‘numerator’, ‘real’]
>>> dir(int)
[‘__abs__’, ‘__add__’, ‘__and__’, ‘__class__’, ‘__cmp__’, ‘__coerce__’, ‘__delattr__’, ‘__div__’, ‘__divmod__’, ‘__doc__’, ‘__float__’, ‘__floordiv__’, ‘__format__’, ‘__getattribute__’, ‘__getnewargs__’, ‘__hash__’, ‘__hex__’, ‘__index__’, ‘__init__’, ‘__int__’, ‘__invert__’, ‘__long__’, ‘__lshift__’, ‘__mod__’, ‘__mul__’, ‘__neg__’, ‘__new__’, ‘__nonzero__’, ‘__oct__’, ‘__or__’, ‘__pos__’, ‘__pow__’, ‘__radd__’, ‘__rand__’, ‘__rdiv__’, ‘__rdivmod__’, ‘__reduce__’, ‘__reduce_ex__’, ‘__repr__’, ‘__rfloordiv__’, ‘__rlshift__’, ‘__rmod__’, ‘__rmul__’, ‘__ror__’, ‘__rpow__’, ‘__rrshift__’, ‘__rshift__’, ‘__rsub__’, ‘__rtruediv__’, ‘__rxor__’, ‘__setattr__’, ‘__sizeof__’, ‘__str__’, ‘__sub__’, ‘__subclasshook__’, ‘__truediv__’, ‘__trunc__’, ‘__xor__’, ‘bit_length’, ‘conjugate’, ‘denominator’, ‘imag’, ‘numerator’, ‘real’]
>>> c=’string’
>>> dir(c)
[‘__add__’, ‘__class__’, ‘__contains__’, ‘__delattr__’, ‘__doc__’, ‘__eq__’, ‘__format__’, ‘__ge__’, ‘__getattribute__’, ‘__getitem__’, ‘__getnewargs__’, ‘__getslice__’, ‘__gt__’, ‘__hash__’, ‘__init__’, ‘__le__’, ‘__len__’, ‘__lt__’, ‘__mod__’, ‘__mul__’, ‘__ne__’, ‘__new__’, ‘__reduce__’, ‘__reduce_ex__’, ‘__repr__’, ‘__rmod__’, ‘__rmul__’, ‘__setattr__’, ‘__sizeof__’, ‘__str__’, ‘__subclasshook__’, ‘_formatter_field_name_split’, ‘_formatter_parser’, ‘capitalize’, ‘center’, ‘count’, ‘decode’, ‘encode’, ‘endswith’, ‘expandtabs’, ‘find’, ‘format’, ‘index’, ‘isalnum’, ‘isalpha’, ‘isdigit’, ‘islower’, ‘isspace’, ‘istitle’, ‘isupper’, ‘join’, ‘ljust’, ‘lower’, ‘lstrip’, ‘partition’, ‘replace’, ‘rfind’, ‘rindex’, ‘rjust’, ‘rpartition’, ‘rsplit’, ‘rstrip’, ‘split’, ‘splitlines’, ‘startswith’, ‘strip’, ‘swapcase’, ‘title’, ‘translate’, ‘upper’, ‘zfill’]

RethinkDB: the open-source database for the realtime web

RethinkDB is an open sourceNoSQL, distributed document-oriented database. It storesJSON documents with dynamic schemas, and is designed to facilitate pushing real-time updates for query results to applications.


ReQL is the RethinkDB query language. It offers a very powerful and convenient way to manipulate JSON documents.


Instead of polling for changes, the developer can tell RethinkDB to continuously push updated query results in realtime  You can also write applications on top of RethinkDB using traditional query-response paradigm, and subscribe to realtime feeds later as you start adding realtime functionality to your app. offers a much higher level of abstraction. RethinkDB’s feeds integrate seamlessly with the query computation engine, and allow you to subscribe to changes on query results, not just raw replication data. This architecture dramatically reduces the time and effort necessary to build scalable realtime app.

  • An advanced query language that supports table joins, subqueries, and massively parallelized distributed computation.
  • An elegant and powerful operations and monitoring API that integrates with the query language and makes scaling RethinkDB dramatically easier.
  • A simple and beautiful administration UI that lets you shard and replicate in a few clicks, and offers online documentation and query language suggestions.


The query-response database access model works well on the web because it maps directly to HTTP’s request-response


However, modern applications require sending data directly to the client in realtime. Use cases where companies benefited from RethinkDB’s realtime push architecture 


you can also write applications on top of RethinkDB using traditional query-response paradigm, and subscribe to realtime feeds later as you start adding realtime functionality to your app.


However, RethinkDB’s query language can do nearly anything SQL can do, including table joins and aggregation functions, and it’s powerful, expressive and easy to learn. ReQL can also do many things SQL can’tdo, including mixing queries with JavaScript expressions and map-reduce.


Supports  Client-side triggers through changefeeds.



When a server fails, it may be because of a network availability issue or something more serious, such as system failure. In a multi-server configuration, where tables have multiple replicas distributed among multiple physical machines, RethinkDB will be able to maintain availability automatically 



Development support

can see live performance of the cluster using graph on rethinkdb dashboard,able write,view databases easily using dashbaoard.


RethinkDB uses three ports to operate—the HTTP web UI port, the client drivers port, and the intracluster traffic port. You can connect the browser to the web UI port to administer the cluster right from your browser, and connect the client drivers to the client driver port to run queries from your application. If you’re running a cluster, different RethinkDB nodes communicate with each other via the intracluster traffic port.



when to use-

RethinkDB is a great choice when your applications could benefit from realtime feeds to your data.

The query-response database access model works well on the web because it maps directly to HTTP’s request-response. However, modern applications require sending data directly to the client in realtime. Use cases where companies benefited from RethinkDB’s realtime push architecture include




  • Collaborative web and mobile apps

  • Streaming analytics apps

  • Multiplayer games

  • Realtime marketplaces

  • Connected devices

port- Once RethinkDB is running, you can connect to it at http://localhost:8080, assuming you’ve kept the default port (8080) and it’s running on your local machine.s



RethinkDB uses a range sharding algorithm parameterized on the table’s primary key to partition the data. When the user states they want a given table to use a certain number of shards, the system examines the statistics for the table and finds the optimal set of split points to break up the table evenly. All sharding is currently done based on the table’s primary key, and cannot be done based on any other attribute (in RethinkDB the primary key and the shard key are effectively the same thing).

What is docker , How to setup docker, HOw to work around docker

Hello Readers,

Let me introduce with ‘Docker’.

Docker is an open source project that automates the deployment of Llinux applications  inside software containers.


Please go through the following commands.

setup docker on ubuntu 14.04
 apt-get -y install
      sudo apt-get -y install
      docker ps -a
      sudo docker ps -a
      docker images
      sudo docker images
      sudo docker pull ubuntu:14.04
      docker run -i -t ubuntu /bin/bash
      sudo docker run -i -t ubuntu /bin/bash
      sudo docker ps -a
      docker attach 6f
list containers and attach containers
sudo docker ps
sudo docker ps -a
sudo docker start ‘first few characters of container listed by using docker ps -a command ….suppose you have containers starts with 6ss you can givr command sudo docker start 6/6s/6ss’
sudo docker attach 6
ls /var/lib/docker/
    2  ls /var/lib/docker/aufs/mnt/6f4d668753e4170c76ac403a7def9cc32cb870b8f12111dc05db4896ea445aa8/
    3  ls /var/lib/docker/aufs/mnt/6f4d668753e4170c76ac403a7def9cc32cb870b8f12111dc05db4896ea445aa8-init/
Mount volume to put the current bas os’s file sin to docker
sudo docker run -v /home/anandprakash:/mnt -t centos:6 ls /mnt   – mount the any location of base os into continaer and fired command like ls
sudo docker run -v /home/anandprakash:/mnt -t centos:6 sh /mnt/ – put the script to continaer by giving mounted volume of the location to continaer
docker image build
cat Dockerfile
FROM ubuntu:latest
MAINTAINER Anandprakash Tandale <>
RUN apt-get update
RUN apt-get install -y python python-pip
RUN pip install Flask
RUN touch /var/test.txt
sudo docker build -t “python_pip:dockerfile” .
sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED              VIRTUAL SIZE
python_pip          dockerfile          54cdc518afcb        About a minute ago   433.5 MB
<none>              <none>              318c589f7931        10 minutes ago       187.9 MB
centos              6                   a0f8f0620fa4        3 days ago           194.6 MB
centos              latest              2a332da70fd1        3 days ago           196.7 MB
ubuntu              latest              594b6e305389        9 days ago           122 MB
ubuntu              14.04               0e7d4a488bcc        9 days ago           187.9 MB
hello-world         latest              70caadc460d7        5 weeks ago          967 B
Docker run bulleted image-
docker run -i -t 700c0c0fb96d bash – where 700c0 is images id
docker cp
copy from docker to base os
 docker cp 2f47b5c2a366:/var/log/nginx/access.log .
docker create snapshot and use as a image
sudo docker run -i -t ubuntu:14.04 /bin/sh
Docker import/export
docker export sharp_shockley | gzip > sharp_shockley.tar.gz



Good source of knowledge and problem solver for software engineers.