Introduction To Docker

Introduction to Docker

I heard about Docker many months ago, but recently i have started to learn it because some fellows in my company remains about it. Docker is simply an engine which we can combine all dependencies of a software and itself in to an image. The difference between Docker and Virtual Machine is that Docker have common kernel with the host OS, and the methods of managing resources are different. You can imagine that Docker is like virtualenv, but in virtualenv, we have own python interpreter which are different in Docker, we share kernel with the host OS. This means that Docker have better performance than VM.

Lets begin with the installation. In Ubuntu:

sudo apt-get install docker.io

Now you can check if the installation is successful by the command line: sudo docker --help

Pull an image from internet to our computer:

sudo docker pull ubuntu

In the above, instead of pulling an ubuntu image, you can replaced ubuntu by other distro name such as fedora, debian. Docker also provide an hub that we can sharing out images like Github. It is really interesting ?

Access to an image:

sudo docker run -i -t ubuntu /bin/bash

The result in my computer: root@6f93ffb044df:/#

Ok, we finished the introduction of installation docker. More information and configurations will be posted in later articles. Hope you enjoy it ! :)