How to enable numbering in vim editor?

When we want to edit any file using vim or vi edtior, we dont see the line numbers. 

So, to enable them,

simply type 

:set nu

To disable them

:set nu!

Creating File in CentOS Docker container



Let's create a file in the centos container.










So, you can see above

- I have a created a directory in my Centos Container (ae358738....) called Sample

- I have created a SampleText.txt file in it

- I exited the centos docker container

Now, to check this file again, we need to restart the same docker container
so, we use







[Press Enter]



And we are back to the same centos container and we can see our files back in it.









So, in this way, we can play between many Operating Systems keeping our whole work in each container safe also.





Exiting Ubuntu Docker Container


Now, to exit this UBUNTU docker container, simply type exit

now, to see the history of container you created, exited, on-going etc, type













To see only running containers,




Remember, if you open a ubuntu image 3 times, so, every time, there will be a different docker container.
And so, from the image, you can see, the containerID. They represent that I opened same ubuntu image multiple times, but, all were having a different docker container.







Lets run Ubuntu using Docker


So, I am running Fedora 20 on my Dell XPS machine









But, I want to run UBUNTU , so here comes the run command in the picture




here, -it = interactive in Linux language











Voila...!!!!!!
That's amazing, and now we are in Ubuntu 14.04.2 LTS








Docker commands (cont.)



To grab the image and download, docker has a pull command (sudo docker pull --help)





if well an image without tag, for instance




it will download multiple images of ubuntu as shown below












So, to avoid this downloading of multiple images, we use a tag

So, with a tag,





here, latest is acting a keyword which will bring down the latest version of ubuntu



To check the existing images in your local directory, type





To kill any running docker container,type





To delete any docker container,type







Docker Commands



To get idea about any docker command




For instance





Output














To search for an image from the terminal,




This will show the similar results you saw on the registry webpage


To get the top results for example with more than100 starts on it, type










Docker


Docker is a virtualization technology like virtual box or vmware.

Allows multiple OS with multiple functionalities

The idea of docker is to virtualize all the apps on one Operating System. So, I can run 
multiple virtualization functionalities on a single OS and having those functionalities isolated from each other.

If you have an app which uses Java7 and there is an app which uses Java 8 , then through Docker both of them can run on a single OS side by side simultaneously, without installing both the JDK's on your machine keeping both of them completely isolated from each other .


Virtualization means having a disk image that represents the system we are running on. So, the docker registry contain tons of such images which we can containerise and use to run anywhere. The docker company and communities maintain this registry.


Remember, docker always require admin access, so use "sudo"