Introduction : Docker is a platform that enables developers to build, packages, and distribute applications in lightweight, portable containers . Containers provide a consistent runtime environment, ensuring that application work the same way across different system .

Docker Engine : is a platform that provide containerization technology for building and containerizing your applications .

Benefits of Docker :

Portability : Container run the same way in development, Testing, and production environments.

Scalability : Easily scale applications with container orchestration tools like Kubernetes .

Efficiency : Uses fewer resources compared to traditional virtual machine .

Isolation : Ensures dependencies and configurations remain consistent across environments .

Installation of Docker :

For Docker Installation I am using Amazon Linux machine . Create Linux machine in AWS. Install Docker using package manager yum .

CMD : 1. sudo yum update 2. sudo yum install docker -y

After installation , verify Docker is running or path .

CMD : 1. docker -- version 2. which docker

Working with Docker

Let’s start with learning commands :

  1. To check docker service start or not . # service docker status

  2. To start docker service . # service docker start

  3. To see all images in your local machine. # docker images

  4. To find out images in docker hub . # docker search ( image name )

  5. To create new container . # docker run -it --name (Name) (image name ) /bin/bash

  6. To download image from docker hub . # docker pull (image name)

  7. To start container . # docker start (container name)

  8. To go inside container . # docker attach (container name)

  9. To see all containers ( running and stop containers) . # docker ps -a

  10. To see only running containers . # docker ps

  11. To stop container . # docker stop (container name )

  12. To delete container . # docker rm (container name )

  13. Exit from container . # exit

  14. To understand changes made in running docker container . # docker diff (container name )

  15. To create a new docker image . # docker commit (container id or name ) (new image name )

  16. To build a docker image from a Dockerfile . # docker build -t (image name ) .