Docker Overview
Checkout my notes at technotes.devdanish.in/docker

Docker Overview

Before diving in with what is Docker, we first need to understand why is docker and what problem it is trying to solve for us. This will give us better context to understand it

Why is docker ?

Have you ever landed in the situation, "Oh!! But, it works fine on my machine" ?

Yes, that's exactly what docker is trying solve. Let's assume you have added a new library to your node application and tested on local. You app goes in the dev environment and will break. Someone will have to run "npm install" prior. Or its an environment variable that is missing. May be it required some configuration in the home directory that is not setup in the dev environment. The margin environment related issues are gigantic.

The application runs in n number of environments like dev, QA, UAT, PROD and not to forget, on multiple servers. In order for the application to perform consistently, the environment in which it is running, should also be consistent as well.

How does Docker helps ?

Docker resolves the issue of inconsistent environments for us. Once we have tested our app in docker, it'll behave the exact same across all environments. To the application, its not running in the dev or QA or any other env but rather it is now running in Docker environment. Docker makes sure to provide our application a consistent environment to run in.

How does docker do it ?

Well. now is the right time to ask:

What is docker ?

Docker is an open source application that provides our applications a containerized environment to run in.

Containerized environment means a self sufficient unit, a container, that has all the dependency our application need to run. That includes

  • Code - jars, dll, code files etc
  • Runtime - OS, JRE, NODE, PYTHON etc
  • Libraries and dependencies
  • Config files
  • Environment variables
  • etc

Back to how docker does it

Since docker provides our application a container to run, that includes all the dependencies including the OS, the app is bound to perform consistent.

These containers are generated at runtime and customized as per our application needs. So regardless of which environment, the app is now running in this lightweight, sort of (not exactly), VM. A VM that can be replicated in any other environment

Now that our app is running in the same OS and everything just the same as while we tested it on local, if our app works fine here, it'll work the same across all other environments.


In the next article I'll try to explain about docker containers and how we create them.

Since I get time to draft these only on the weekends, you can checkout my notes at technotes.devdanish.in/docker



要查看或添加评论,请登录

Danish Javed的更多文章

  • Spring Boot and Node Applications in Docker

    Spring Boot and Node Applications in Docker

    Now we are finally getting close to a production setup. In microservices we have multiple instance of multiple…

  • Docker Setup

    Docker Setup

    Finally we are going to setup and run our first container. Excited ?! Alright, lets begin.

  • Docker Perquisite understanding & Setup

    Docker Perquisite understanding & Setup

    This is continuation of my previous article. if you haven't read that already, I recommend reading that first :…

  • Docker Containers and Images

    Docker Containers and Images

    This is continuation of my previous article. if you haven't read that already, I recommend reading that first :…

社区洞察

其他会员也浏览了