Docker basics and commands

I am sure that if you are here, you definitely heard about docker few times at-least. Docker and containerisation are the buzz words of any team these days. So, there are few similar words related do docker. This article will walk you through some terms and I will post some most basic operative commands which are being used.


Docker (Software): Docker is an open-source software designed to facilitate and simplify application development. It is a set of platform-as-a-service products that create isolated virtualisation environments for building, deploying, and testing applications.

Docker (Company): Docker Inc is the company which developed and maintaining docker.

Docker Hub: Docker Hub is the world’s largest library and community for container images

Container: A Docker container is a virtualisation run-time environment where users can isolate applications from the underlying system. These containers are compact, portable units in which you can start up an application quickly and easily

Image: A Docker image is an immutable (unchangeable) file that contains the source code, libraries, dependencies, tools, and other files needed for an application to run

Registry: Container Registry provides storage of Docker container images, enabling fast, scale-able retrieval and network-close deployment of container workloads.

Docker compose: Docker Compose is a file which provides a way to document and configure all of the application’s service dependencies.

Some basic docker commands are:

docker ps  //check all the running docker
docker exec -it <container_Name> /bin/bash //get into the running container
docker exec -it <container_Name> /bin/bash //get into the running container
docker rm <container_id> //remove the container

docker start <container_id> //start a container

docker stop <container_id> //stop contaner

docker ps -a //see all the containers including stopped ones

docker run -d -p <host_port>:<container_port> --name <container_Name> <image_name>:<Image_version/tag> //run a docker image with port and details.

docker image ls //list all the images in the system

docker rmi <image-name> //remove the docker image from the system

docker image pull <image_name>:<image_version/tag> //pull an image from remote system

docker build . //build a docker image (make sure to have Dokcerfile)

docker tag image:latest username/image:demo //tag a built image

Start-up and tech enthusiast. I write about Tech, Devops and anything related.