Docker @ Innoraft
2016 14 May

Docker @ Innoraft

My previous blog How I Started Docker was about my first encounter about Drupal. After that, we all started playing with Docker and soon we adopted the technology with full force in our development workflow.

In this blog, I’ll be sharing my experience on how we can dockerize our drupal setups.

Docker

“Develop, Ship and Run Any Application, Anywhere”

While working with Docker, I came up with my own definition for ease of understanding. Docker is a service which allows you to use multiple and diverse services of the same type on the same machine, typical stuff isn’t it?? Umm... In simple words, with docker you can run different web servers simultaneously which means at the same time you can run your Nginx server for one application and apache2 server for another application on the port 80 itself.

Why we chose Docker

Below are some of the reasons why Docker is the right choice for you:

  1. Whenever we deploy on our dev servers, most of the time we used to scream, “What just happened? It was working perfectly fine on my local. Why isn't it working on Dev?”.

  2. Our local environment and our dev, stage environments usually have different configurations in terms of server, for e.g., if I am using a machine, which is 3 years old, so there is a good chance that I have some old version of PHP, apache2 etc. More often than not we end up in a situation of different versions of different services in different environments which is not healthy for deployments.

  3. Difficulty in the deployment of server related changes.

  4. We were failing in updating the projects i.e. my local has 4 different projects and all support say PHP 5.3.3 version, now the client asked us to update the PHP version of two of the projects. It was very very difficult to maintain different versions of the same service on the same machine i.e. on local.

  5. We were not able to experiments with different services of the same type.

...there are more reasons but the above ones are most commonly faced.

Docker in Innoraft

Docker at rescue

Answers to all our problems were to isolate the services and be able to seamlessly communicate with each other and that’s where Docker came into action.

Concept

Docker allows you to package an application with all of its dependencies into a standardized unit for software development. We create images of different services - say, you have one image for apache, one image of MySQL and etc. With the help of these images, we launch containers. Containers are analogous to VMs but they are way lighter.

Terminology

  1. Containers:- Containers are basically a setup of services with only the required things. For e.g., for you, web server all you need is an OS, and Apache2 with required modules. We don’t even want a text editor for running a web server. So your container will have a very light setup of OS, say Ubuntu, and your web server will be installed on this OS.
     

  2. Images:- Images are the prototype of containers. Containers are launched from the images. With images, you can create base images and can reuse them. Say, you have created a base image of Ubuntu, now this image can be used to create other images. For e.g., you have to create two different containers i.e. one for the webserver and other is for the database server.

How images are used:

  1. Create an image for your base OS
    1. Install OS

  2. Create an image for Apache server

    1. Use the above-created image, and install the Apache server on top of it.

  3. Create an image for the database server

    1. Use the previously created image, and install the database server on top of it.

This is again an explanation for the basic Docker concepts. In the next post, I will be talking about the full process of building docker images and using them for your projects.

Latest Blogs

Website Web Design tips

10 Effective Website Web Design Tips: How to Design a Website That Works

A website is an important identity of any brand in today’s digital-first era. Users will first visit the website to gather information about any brand or company.

Read More

Website Revamp Process

When to plan for your website revamp and how?

The only constant in the world is "CHANGE". Though this line has become a cliche, it is very important to implement the same in our businesses.

Read More

Wireframing Tools

7 Awesome Wireframing Tools You Should Be Using

In the last decade, the importance of UI/ UX designing has increased significantly in the segment of websites, apps and mobile games mockup design and development.

Read More

CMS to use for website

Are you getting confused about which CMS to choose for your new website?

A very happy new year 2020! I am sure the celebration was fun. And I am also sure that the targets, the meetings, the daily chores are already haunting you.

Read More