Sunday, April 17, 2016

Installation of Docker

In this guide we will install Docker on Ubuntu Trusty 14.04 (LTS). If you do not have ubuntu, check out my step by step guide to install Ubuntu on Vmware.

1. Open terminal on ubuntu and change it to root user, so we don’t have to enter password again and again.

2. Docker requires your kernel to be 3.10 at minimum.
It is very likely that when you are reading this, the kernel of you ubuntu will be at least 3.10 ( I think might be greater than 4). Anyway if you want to check your kernel version, use,
    # uname -r

3. Before installing lets sync up our packages indexes from source by using,
   # apt-get update

4. Now we will install docker using,
   # apt-get install -y

You might be thinking - what's up with the io? Exactly! Little annoying thing about Ubuntu. Those guys already had some legacy package called docker, so in order to get this docker into the repo, they gave it slightly different name. Open a browser and type and see where that leads you to.

5. Just to make sure it is installed and running, use
  # service docker status

You can see it is up and running.

6. Keep in mind that docker package includes both the client and daemon. We got access to the client and the daemon. Use 
  # docker -v 

That’s the docker client throwing -v at the docker deamon asking for version. 
The daemon responds the client with the current version.

7. For more information, use 
  # docker version 

So the client and the server are both at 1.6.2. Then we see the version of other components like Go. Remember docker is written in Go lang.

8. Let's use one more command,
  # docker info

Notice the big fat 0 for both containers and Images, makes sense we don’t have any images or containers at this moment. We also see that the storage driver is 'aufs', meaning 'advanced union file system' (or sth like that). This is the default layered or union mount system for docker containers on ubuntu. 

9. This is all on this guide. If you would like to update your docker version then look at my another guide to Update Docker version.

No comments:

Post a Comment