Tech Blog

Coding

Hands on with Docker from scratch

By Utsav Solanki2 min read
← Back to blog

Docker is a containerization tool. It creates, manages and maintain the containers. It is a lightweight container orchestration tool. It’s easy to deploy an applications with in containers and offers fast way of application execution, efficient way to build, Interoperability and multiple OS level abstraction.

Steps for Docker installation in Ubuntu
Update the packages command :

$ sudo apt-get update 
$ sudo apt-get install \   
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

Adding Docker official GPG key [1]

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Set up the stable repository x86_64 / amd64

$ echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Docker engine installation with latest version, including containerd

$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

Successfully execution of below commands considers as Docker engine installed correctly

$ sudo docker run hello-world

Below are some basic commands, for pull, run and remove Docker containers.
Pull Docker image for Docker Hub:

$ Docker pull <Docker-image-name> 

List all images

$ Docker images ls

Remove Docker image

$ Docker rm <Docker-image-name> 

Create a container from images

$ Docker run <Docker-image-name> 

List all running containers

$ Docker ps -a

Remove Docker image and running container

$ Docker rmi <Docker-image-name> 
$ Docker rm <Docker-container-id>

Awesome, you have hands on with Docker. Moving forward, you can try many other commands [1]

Keep reading

You may be interested in

Browse all articles →
Active Directory Federation Service
July 5, 20235 min read

Active Directory Federation Service

Active Directory Federation Service (ADFS) uses claims-based identity model to maintain application security and to implement federated identity. ADFS is a concept of Windows Server operating system, that provides users with single sign-on access to the application, those are located across organizational boundaries. For Example: We have 2 organizations – Organization 1 and Organization 2. […]

By Abinash MishraRead More →
Remote Access to Microsoft SQL Database Server
April 5, 20232 min read

Remote Access to Microsoft SQL Database Server

Remote access to a SQL server is important because it allows users to access the server from anywhere, at any time. This enables remote workers to access the data they need when they need it, even if they are not physically in the same location as the server. It also allows IT admins to access […]

By Malkeet SinghRead More →
Types of Load Balancer in AWS
February 6, 20235 min read

Types of Load Balancer in AWS

What is Load Balancing ? Load balancing is a critical component of any scalable and highly available Cloud or On-premise architecture. It helps distribute incoming traffic across multiple servers, improving the availability and scalability of a website or application. In the cloud, load balancing is offered as a service by various cloud providers such as […]

By Keerthik ShenoyRead More →