tech-blog

Introduction to Containers and Docker

November 22, 2018

Docker

Containers, Docker and Kubernetes have become the new buzzwords in tech (in this post, I won’t talk about Kubernetes). However, they’re correctly being hyped because they are indeed the future of how applications will be built. Infact, using Docker now is becoming extremely common.

so what is Docker?

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Docker is a technology that allows you to incorporate and store your code and its dependencies into a neat little package - an image.

A docker image holds your source code and the dependencies it needs. Lets say you have a Node.js app, A docker image of your app will contain the code + the node_modules and everything that’s needed to run your Node.js app.

So now we know what a Docker Image is, let’s talk about Containers.

Containers

Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.

Containers are encapsulated environments in which applications are run. A container is defined by the Image and configuration options. Containers basically are where the (Docker) Image runs.

Now you can have many containers running the same Docker Image since a Docker Image it has all it needs (code + dependencies/configuration). Now you can increase and decrease the number of containers to scale your application. How easy is that.


Alamgir Qazi

Hey there, I'm Alamgir Qazi. I work as a full-stack JavaScript Developer. I'll be sharing what I've learned about Angular, Node, Docker, Kubernetes and other cool things.