What is Docker? Containers / Installation and Basic commands.

What is Docker? Containers / Installation and Basic commands.

Table of contents

Introduction :

Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardized units called container that have everything the software needs to run including libraries, system tools, code, and runtime. Using Docker, you can quickly deploy and scale applications into any environment and know your code will run.

  1. Docker is an open-source centralized platform designed to create deploy and run applications.

  2. Docker uses a container on host machine 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 .

  3. Docker is written in Go language.

  4. Docker is a tool that performs OS-level virtualization also known as containerization.

What Are Containers?

Docker containers are lightweight virtualized runtime environments for running applications. Each container represents a package of software that contains code, system tools, runtime, libraries, dependencies, and configuration files required for running a specific application. They are independent and isolated from the host and other instances running on the host.

Containers are based on Docker images. You build a container by running an image on the Docker Engine.

Images become containers when they run on docker engine.

Docker Architecture

Docker Architecture in Detail - Whizlabs Blog

Docker Installation and Important Commands :

To Install docker on aws instance ubuntu run the below commands:

sudo apt-get install docker.io -y

To check if docker service is start or running :

service docker status

To start the service

service docker start

To see all images present on your local run below commands :

docker images

To download images from docker-hub to a local machine.

docker pull <image name>

To run a image on docker

docker run <image name>

To see all the containers

docker ps -a

To see only running containers

docker ps

To stop the container

docker stop <container name>

To delete container

docker rm <container name>

To delete Images

docker image rm <image name>

Conclusion

Docker is a powerful tool to run a container and it is used to deploy containers on multiple env dev, test, prod. You can use this guide to learn the basics about docker and installation commands and its use. Thanks for reading this blog put your comments if you like.