Introduction to Docker: A Beginner's Guide

Docker is a containerization platform that was created in 2013 by Solomon Hykes. It was initially developed as an internal tool at dotCloud, a cloud hosting company.

What is Container

A container is like a handy package that contains your application, all the libraries it needs to run, and only the essential system dependencies.

Difference between Virtual machines and Container

1. Resource Utilization: Containers are lighter and faster since they share the host OS, while VMs are heavier due to needing a full OS and hypervisor.

2. Portability: Containers can run on any compatible system, whereas VMs require a specific hypervisor.

3. Security: VMs offer better security with their own OS, while containers are less isolated as they share the host OS.

Why are containers light weight

Containers are lightweight because they share the host computer's operating system instead of needing a full operating system like traditional virtual machines. This sharing allows applications to run in their own space, keeping them separate while using less storage. Docker containers are kept simple and only include what the application needs, making them even smaller. Example-Official ubuntu base image which you can use for your container is just 22 MB whereas official ubuntu VM image it will be close to 2.3 GB. So the container base image is almost 100 times less than VM image.

What is Docker

Docker is a tool that helps you package your applications into containers. With Docker, you can create container images, run them as containers, and share them on platforms like DockerHub and Quay.io

There are three important things

  1. docker build -> builds docker images from Dockerfile

  2. docker run -> runs container from docker images

  3. docker push -> push the container image to public/private registries to share the docker images.

Terminologies Used in Docker

  1. Docker Daemon-The Docker daemon (dockerd) is a program that waits for requests and handles Docker items like images, containers, networks, and volumes. It can also talk to other daemons to manage Docker services.

  2. Docker Desktop-Docker Desktop is a user-friendly app for Mac, Windows, and Linux that helps you create and share containerized applications and microservices. It includes essential tools like the Docker daemon, Docker client, Docker Compose, Kubernetes, and more

  3. Docker registries-A Docker registry is where Docker images are stored.When you use the commands docker pull or docker run, Docker pulls the required images from the registry. If you use the docker push command, it uploads your image to the registry.

  4. Dockerfile-It is a file where you provide the steps to build your Docker Image.

  5. Images-An image is a read-only template with instructions for creating a Docker container.

0
Subscribe to my newsletter

Read articles from Shantanu Chaughule directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shantanu Chaughule
Shantanu Chaughule

DevOps Engineer having knowledge on Azure, Docker, Kubernetes, CI/CD Pipelines and ArgoCD