# Dockers for Devops

### **Docker**

Docker is an open-source centralized platform to create deploy and run applications. Docker uses the container on the host OS to run applications. It allows using the same Linux kernel on the System rather than creating a virtual OS. It's written in the GO language.

### **Architecture of Docker**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683196401899/24e33152-b8c5-4bcc-910e-97721b446106.png align="center")

### **Components of Docker**

**Docker Daemon-**

Docker Daemon runs on the Host OS. It's responsible for running and managing the docker service.

Docker Client

Docker users can interact with docker Daemon through a client. It uses commands and Rest APIs to communicate with the docker daemon.

Docker Host

It provides an environment to run and execute applications. It contains the docker daemon, images, containers, network and storage.

Docker Hub/Registry

It manages and stores the docker images.

Docker Images

A docker image is a file that contains all the necessary files, dependencies, and configuration settings to create a containerized application.

Docker Container

A Docker container is a lightweight, standalone, and executable package that contains everything needed to run a piece of software, including the application code, runtime, system tools, libraries, and settings.

### Installation of Docker and Basic Commands

Installing docker in Ubuntu

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683196681202/6903078e-0c88-4740-a5d4-2bc392c52b1d.png align="left")

To download images from docker-hub to local machine

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683196789561/115a5135-7aa3-4bcc-adb6-03b070599315.png align="left")

To view the Images present in the local machine

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683196966143/ef26811c-43ff-484d-868d-c2a8f769d6bf.png align="center")

To check whether the service is started or stopped

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683197039795/f104aa7d-df8c-4be5-9b19-c5144984c03d.png align="center")

To Stop the Service

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683197143267/274609ff-f114-48c0-9dec-ff488e913979.png align="left")

To start the Service

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683197260471/ef3ed4ef-b998-4826-891b-e830adfcd8bd.png align="left")

Docker ps

This command will list all the running containers

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683197331341/d4040b0d-85d4-43f6-9aee-2993c8f44ec0.png align="center")

Docker run

The `docker run` command to start a new container and interact with it through the command line.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683197391828/50a7fc9b-7985-4830-b9dd-eef12299a454.png align="center")

Docker images

It will display all the available images

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683197459314/557e4fc7-b5b4-44a3-bb4e-7acfca7cb600.png align="center")

Docker inspect

The `docker inspect` command to view detailed information about a container or image.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683202066477/72397936-baee-4ed4-8a60-7b974ed08c4f.png align="center")

Docker Save

The `docker save` command to save an image to a tar archive.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683202532215/d56903e3-325e-4645-98f5-9ee470329183.png align="center")

**Thanks for Reading!**

see you in the next 😊
