Understanding Docker – Why, What and How to use it!

Suppose you write a text file and wish to open this text file into another environment. Then sometimes it comes up with a warning that this text font is not supported in this environment. But meanwhile you convert that text file into a pdf format and then open the same pdf in another environment. That pdf file have no issues with the environment. Like wise, with the docker, it binds up the different IT operations like code, system libraries, system tools, runtime. It runs on server without any leakage i.e. a full proof solution to server deployment. So, this post is about understanding docker installation and usage.

Why should we use Docker

“Docker achieves agility and control for Development and IT Operations teams to build, ship, and run any app, anywhere”

Agility: Docker gives developers the freedom to define environments, and create and deploy apps faster and easier, and flexibility for IT ops to quickly respond to change.

Control: Docker enables developers to own all the code from infrastructure to app, and the manageability for IT ops to standardize, secure and scale the operating environment.

Portability: Docker gives you choice without complexity, from a laptop to a team, to private infrastructure and public cloud providers.

What is Docker

Docker allows you to package an application with all of its dependencies into a standardized unit for software development.
Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.

Docker is basically a container that we use to ship over. It provides us the facility to run our application anywhere regardless of the environment and other technicalities. It has defined all the things in a wrapped box which is equally secured and ease to operate.

How to Use Docker

Step1: Install Docker on Ubuntu 14.04

Step2: Build up your project using docker

Step3: Watch that docker container has your project image

Step4: Run your application over docker

Step5: View your project running over the docker

Step6: View the logs that is bind up in your project

Step7: Stop the image from being run

Step8: Kill the image while running

Step9: Remove the image from being run

Step10: Remove the project image from docker

Some points to take in mind while running docker on your machine.

– If you are using MySQL, you have to change bind-address in my.conf or mysqld.conf from 127.0.0.1 to 0.0.0.0, so that it can accept request from any IP Address.

– You have add port MySQL port

– Verify that your MySQL is accepting request from other IP Address. For that
or,