0% found this document useful (0 votes)
5 views

Mastering Docker Commands

The document provides an overview of Docker, a software that manages containers on a single host machine, highlighting its portability, efficiency, isolation, and speed. It outlines key components of Docker, including images, containers, Docker Engine, and Docker Hub, and lists essential Docker commands for managing containers and images. The commands include pulling images, listing images and containers, running containers, executing commands in containers, inspecting containers, fetching logs, and displaying resource usage statistics.

Uploaded by

varam10
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Mastering Docker Commands

The document provides an overview of Docker, a software that manages containers on a single host machine, highlighting its portability, efficiency, isolation, and speed. It outlines key components of Docker, including images, containers, Docker Engine, and Docker Hub, and lists essential Docker commands for managing containers and images. The commands include pulling images, listing images and containers, running containers, executing commands in containers, inspecting containers, fetching logs, and displaying resource usage statistics.

Uploaded by

varam10
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

KETAN PAWAR

Aniruddha Kharve

DOCKER
COMMANDS
BASICS
MASTER ESSENTIAL DOCKER COMMANDS
FOR MANAGING CONTAINERS AND IMAGES
EFFICIENTLY.
KETAN PAWAR

01
WHAT IS
DOCKER?
Docker is software that manages
containers running on a single host
machine.
Docker is not a container, and a
container is not Docker.
It enables packaging and running
applications in a loosely isolated
environment called a container.
Docker is not a multi-host
application/tool.
KETAN PAWAR

02
WHY USE
DOCKER?
Portability: Run anywhere.
Efficiency: Lightweight and fast.
Isolation: No conflicts.
Speed: Quick deployments.
KETAN PAWAR

KEY 03

COMPONENTS an

OF DOCKER
Images: Read-only templates used
to create containers.
Containers: Lightweight,
standalone, and executable units of
software.
Docker Engine: Core service for
building and running containers.
Docker Hub: A repository for
sharing and managing Docker
images.
KETAN PAWAR

ESSENTIAL 04
DOCKER
COMMANDS
1. Docker Pull:
$ docker pull docker.io/httpd
Pulls an image or a repository
from a registry
KETAN PAWAR

2. Docker Images :
05
$ docker images

List all Docker images available


on your system
KETAN PAWAR

3.Docker Run :
$ docker run -docker.io/httpd 06

Create and run container from an


image.
-d stands for detach. it Runs container
in background and prints the container
ID

7
KETAN PAWAR

4.Docker Ps :
07
$ docker ps

List only running containers.

8
KETAN PAWAR

5.Docker Ps -a:

$ docker ps -a 08

List all containers, including stopped


ones.

9
KETAN PAWAR

6.Docker Exec :
09
$ docker exec -it
<Container_ID>/<Container_na
me> :

-exec: Execute a command in a


running container.
-it: allocate interactive bash
terminal to container.

10
KETAN PAWAR

7.Docker inspect

$ docker inspect 10
<Container_ID>/<Container_name> :

Return low-level information on


Docker Objects.
View detailed metadata about the
container with the ID b8cba.

11
KETAN PAWAR

8.Docker Logs:
11
$ docker logs [option]<Container_id/Name>

Fetch logs of a running or stopped


container.
Use docker logs --help for more
option

12
KETAN PAWAR

9.Docker Stats :
12
$ docker stats [Option]
<Container_id/name>

Display a Live Stream Container’s


resource usage statistics.

You might also like