Home Tech Stuff Docker basic info and commands

Docker basic info and commands

In this post, we are going to focus on Docker’s basic information and basic commands in a very quick and simple way, let’s start.

What is Docker

● Open-source Centralised Platform designed to Create, deploy and run applications

● It Uses Container on the host OS to run applications It allows applications to use the same Linux Kernel as a System on the host Computer rather than Creating a whole Virtual O S

● We Can install Docker on any OS but D.E. runs natively on Linux Distribution

● Docker is written in ‘go language’

● OS Level Virtualization also Known as Containerization

● Docker is a Set of PAAS

Why We Need Docker

● Before Docker many users faces the problem that particular Code running the developer’s system but not in the User’s System

● For distributing your app’s OS with a team, and as a version control system

● Conventional Deployment takes a longer time

● Infrastructure development takes time

● Application portability is a challenge (it works on my machine)

● Manual deployment scripts are difficult to manage and version control.

Docker Images

● Read only template used to create containers

● Stored in the Docker Hub or in your local registry

● Image is a Read Only Template and is used to create a container

● You can’t Edit, But u can delete

● 2 Method to create Image ( Interactive Method , Dockerfile Method)

A Docker image is made up of a collection of files that bundle together all the essentials, such as installations, application code and dependencies, required to configure a fully operational container environment.

Also Read: Install MySQL And WordPress With Docker Compose YML

Docker Containers

● Running State of Image

● It is Like a Virtual Machine

● It Works on Layered File System

● Runnable instance of a docker image

● Isolated application platform

● Contains everything needed to run your application

● Based on one or more images

● Each container has its own Root file system, Processes,Memory, Devices, Network ports

Docker File

● A Dockerfile is a text document that contains all the commands a user could call on the command line to
assemble an image.

● Using docker build users can create an automated build that executes several command-line instructions in succession.

Docker Hub

● Docker Hub is the world’s largest repository of container images with an array of content sources including container community

● Docker Hub is a hosted repository service provided by Docker for finding and sharing container images with your team.

● Private Repositories: Push and pull container images.

● Automated Builds: Automatically build container images from GitHub and Bitbucket and push them to Docker Hub.

● Users get access to free public repositories for storing and sharing images or can ca hoose subscription plan for private repos.

Also Read: How to Install Docker on Ubuntu Linux

Docker Work Flow

Docker Eco System

Docker Advantages

● Rapid Deployment

● No pre-allocation of RAM

● CI Efficiency, Build App only once

● Less Cost and lightweight

● It can run on the Physical Hardware and Virtual Machine

● You can reuse the image

● Less time to create a container (VM)

● Version Controlling

● Portability

● Isolation

Docker Disadvantages

● Not a Good solution for Rich GUI

● Difficult to Manage Large Amount (Containers )

● Cross-platform compatibility issue

● Only suitable when team OS is the same

● No solution For data recovery & Backup

Docker Basic Commands

docker –version To check the currently installed version of docker

service docker start/stop To Start/stop service Docker (Engine)

docker images To check images Locally

docker pull To Pull Image from Docker hub

docker run Combination of Create and Start ( Usage: docker run -it –name container:1.1 /bin/bash )

docker ps To List the Running Container ( ps =Process status )

docker ps -a To list all containers ( Running and Exited Containers )

docker search To Find out the image in Docker Hub

docker start/stop To start/stop Container

docker attach To go inside the container

docker rm To Remove the Container


In this article, we have summarized about what is Docker its Advantages, Disadvantages, and some basic level commands. Comment below or contact me if you have queries regarding the article.


Please enter your comment!
Please enter your name here