SlideShare a Scribd company logo
7
Most read
18
Most read
22
Most read
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Agenda
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Most Used Docker Commands
docker --version
docker --help
docker pull
docker run
docker build
docker login
docker push
docker ps
docker images
docker stop
docker kill
docker rm
docker rmi
docker exec
docker commit
docker import
docker export
docker container
docker compose
docker swarm
docker service
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker --version
This command returns the version of Docker which is installed
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker --help
This command returns a list of commands available in Docker
along with the possible flags (options)
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker pull
This command pulls a new Docker image from the Docker Hub
$ docker pull ubuntu
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker images
This command lists down all the images in your local repo
$ docker images
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker run
This command executes a Docker image on your local repo &
creates a running Container out of it
$ docker run ubuntu
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker build
This command is used to compile the Dockerfile, for building
custom Docker images based on the
$ docker build –t MyUbuntuImage .
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker container
This command is used to perform various operations on the
container. Refer to www.docs.docker.com for more info.
$ docker container logs
$ docker container kill
$ docker container rm
$ docker container run
$ docker container start
And so on..
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker login
This command is used to Login to Docker Hub repo from the
CLI
$ docker login
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker push
This command pushes a Docker image on your local repo to
the Docker Hub
$ docker push vardhanns/MyUbuntuImage
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker ps
This command lists all the running containers in the host
If ‘–a’ flag is specified, shutdown containers are also displayed
$ docker ps
$ docker ps -a
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker stop
This command shuts down the container whose Container ID is
specified in arguments. Container is shut down gracefully by
waiting for other dependencies to shut
$ docker stop fe6e370a1c9c
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker kill
This command kills the container by stopping its execution
immediately. Its similar to force kill
$ docker kill fe6e370a1c9c
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker rm
This command removes the container whose Container ID is
specified in arguments
$ docker rm fe6e370a1c9c
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker rmi
This command removes the image whose name has been
specified in arguments
$ docker rmi MyUbuntuImage
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker exec
This command is used to access an already running container
and perform operations inside the container
$ docker exec -it fe6e370a1c9c bash
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker commit
This command creates a new image of an edited container on
the local repo
$ docker commit fe6e370a1c9c vardhanns/MyModifiedImage
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker export
This command is used to export a Docker image into a tar file
in your local system
$ docker export --output=“latest.tar” mycontainer
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Docker Commands
docker import
This command is used to import the contents of a tar file
(usually a Docker image) into your local repo
$ docker import /home/edureka/Downloads/demo.tgz
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Advanced Docker Commands
docker compose
This command is used to power multi-container applications
where various services will be hosted inside different containers
$ docker-compose build
$ docker-compose up
Note: This command is executed in the directory
where YAML file is present for building the Compose.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Advanced Docker Commands
docker swarm
This command creates a network of Docker engines/ hosts to
execute containers in parallel (for scaling up & high availability)
$ docker swarm init --advertise-addr 192.168.1.100
$ docker swarm join
$ docker swarm join-token
$ docker swarm leave
And so on..
Docker
Manager
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Advanced Docker Commands
docker service
This command is used to control any existing Docker service
(Containers/Compose/Swarm/Others..
$ docker service ls
$ docker service ps
$ docker service scale
$ docker service stop
And so on..
$ docker service logs
$ docker service rm
WebDriver vs. IDE vs. RC
➢ Data Warehouse is like a relational database designed for analytical needs.
➢ It functions on the basis of OLAP (Online Analytical Processing).
➢ It is a central location where consolidated data from multiple locations (databases) are stored.

More Related Content

What's hot (20)

PDF
Docker swarm
Alberto Guimarães Viana
 
PPTX
Dockers and containers basics
Sourabh Saxena
 
PDF
Docker Introduction
Peng Xiao
 
PPT
presentation on Docker
Virendra Ruhela
 
PDF
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Edureka!
 
PDF
Docker and the Linux Kernel
Docker, Inc.
 
PPT
Docker introduction
Phuc Nguyen
 
PPTX
Introduction to Docker - 2017
Docker, Inc.
 
PPTX
Introduction to docker
Frederik Mogensen
 
PPTX
K8s security best practices
Sharon Vendrov
 
PPTX
Docker Swarm for Beginner
Shahzad Masud
 
PPTX
AKS
girish goudar
 
PPTX
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Simplilearn
 
PPTX
Docker, LinuX Container
Araf Karsh Hamid
 
PDF
Introduction to docker and docker compose
Lalatendu Mohanty
 
PPTX
Why Docker
dotCloud
 
PDF
Introduction to Docker storage, volume and image
ejlp12
 
PDF
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
Edureka!
 
PDF
Docker Introduction
Robert Reiz
 
PPTX
Introduction to kubernetes
Rishabh Indoria
 
Dockers and containers basics
Sourabh Saxena
 
Docker Introduction
Peng Xiao
 
presentation on Docker
Virendra Ruhela
 
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Edureka!
 
Docker and the Linux Kernel
Docker, Inc.
 
Docker introduction
Phuc Nguyen
 
Introduction to Docker - 2017
Docker, Inc.
 
Introduction to docker
Frederik Mogensen
 
K8s security best practices
Sharon Vendrov
 
Docker Swarm for Beginner
Shahzad Masud
 
Docker Compose | Docker Compose Tutorial | Docker Tutorial For Beginners | De...
Simplilearn
 
Docker, LinuX Container
Araf Karsh Hamid
 
Introduction to docker and docker compose
Lalatendu Mohanty
 
Why Docker
dotCloud
 
Introduction to Docker storage, volume and image
ejlp12
 
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
Edureka!
 
Docker Introduction
Robert Reiz
 
Introduction to kubernetes
Rishabh Indoria
 

Similar to Docker Commands With Examples | Docker Tutorial | DevOps Tutorial | Docker Training | Edureka (20)

PPTX
Docker Introductory workshop
Runcy Oommen
 
PPTX
Docker Command Line, Using and Choosing containers
Will Hall
 
POTX
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Swaminathan Vetri
 
PPTX
Primi passi con Docker - ItalianCoders - 12-01-2021
Alessandro Mignogna
 
PPTX
Docker workshop DevOpsDays Amsterdam 2014
Pini Reznik
 
PDF
Docker by Example - Basics
Ganesh Samarthyam
 
PDF
Running the Oracle SOA Suite Environment in a Docker Container
Guido Schmutz
 
PDF
Introduction to Docker - Learning containerization XP conference 2016
XP Conference India
 
PDF
Docker Swarm For High Availability | Docker Tutorial | DevOps Tutorial | Edureka
Edureka!
 
PDF
Docker: A New Way to Turbocharging Your Apps Development
msyukor
 
PDF
Docker for developers on mac and windows
Docker, Inc.
 
PDF
Docker - from development to production (PHPNW 2017-09-05)
Toby Griffiths
 
PDF
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
Docker, Inc.
 
PPTX
Running Docker in Development & Production (DevSum 2015)
Ben Hall
 
PPTX
Docker Introduction
Jannis Kirschner
 
PDF
Docker Swarm & Machine
Eueung Mulyana
 
PPTX
Docker for Web Developers: A Sneak Peek
msyukor
 
PDF
A Hands-on Introduction to Docker
CodeOps Technologies LLP
 
PPTX
Introduction To Docker
Dr. Syed Hassan Amin
 
PDF
Dockers & kubernetes detailed - Beginners to Geek
wiTTyMinds1
 
Docker Introductory workshop
Runcy Oommen
 
Docker Command Line, Using and Choosing containers
Will Hall
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Swaminathan Vetri
 
Primi passi con Docker - ItalianCoders - 12-01-2021
Alessandro Mignogna
 
Docker workshop DevOpsDays Amsterdam 2014
Pini Reznik
 
Docker by Example - Basics
Ganesh Samarthyam
 
Running the Oracle SOA Suite Environment in a Docker Container
Guido Schmutz
 
Introduction to Docker - Learning containerization XP conference 2016
XP Conference India
 
Docker Swarm For High Availability | Docker Tutorial | DevOps Tutorial | Edureka
Edureka!
 
Docker: A New Way to Turbocharging Your Apps Development
msyukor
 
Docker for developers on mac and windows
Docker, Inc.
 
Docker - from development to production (PHPNW 2017-09-05)
Toby Griffiths
 
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
Docker, Inc.
 
Running Docker in Development & Production (DevSum 2015)
Ben Hall
 
Docker Introduction
Jannis Kirschner
 
Docker Swarm & Machine
Eueung Mulyana
 
Docker for Web Developers: A Sneak Peek
msyukor
 
A Hands-on Introduction to Docker
CodeOps Technologies LLP
 
Introduction To Docker
Dr. Syed Hassan Amin
 
Dockers & kubernetes detailed - Beginners to Geek
wiTTyMinds1
 
Ad

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
PDF
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
PDF
Tableau Tutorial for Data Science | Edureka
Edureka!
 
PDF
Python Programming Tutorial | Edureka
Edureka!
 
PDF
Top 5 PMP Certifications | Edureka
Edureka!
 
PDF
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
PDF
Linux Mint Tutorial | Edureka
Edureka!
 
PDF
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
PDF
Importance of Digital Marketing | Edureka
Edureka!
 
PDF
RPA in 2020 | Edureka
Edureka!
 
PDF
Email Notifications in Jenkins | Edureka
Edureka!
 
PDF
EA Algorithm in Machine Learning | Edureka
Edureka!
 
PDF
Cognitive AI Tutorial | Edureka
Edureka!
 
PDF
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
PDF
Blue Prism Top Interview Questions | Edureka
Edureka!
 
PDF
Big Data on AWS Tutorial | Edureka
Edureka!
 
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
PDF
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
PDF
Introduction to DevOps | Edureka
Edureka!
 
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Edureka!
 
Ad

Recently uploaded (20)

PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Digital Circuits, important subject in CS
contactparinay1
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 

Docker Commands With Examples | Docker Tutorial | DevOps Tutorial | Docker Training | Edureka

  • 1. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Agenda
  • 2. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Most Used Docker Commands docker --version docker --help docker pull docker run docker build docker login docker push docker ps docker images docker stop docker kill docker rm docker rmi docker exec docker commit docker import docker export docker container docker compose docker swarm docker service
  • 3. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker --version This command returns the version of Docker which is installed
  • 4. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker --help This command returns a list of commands available in Docker along with the possible flags (options)
  • 5. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker pull This command pulls a new Docker image from the Docker Hub $ docker pull ubuntu
  • 6. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker images This command lists down all the images in your local repo $ docker images
  • 7. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker run This command executes a Docker image on your local repo & creates a running Container out of it $ docker run ubuntu
  • 8. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker build This command is used to compile the Dockerfile, for building custom Docker images based on the $ docker build –t MyUbuntuImage .
  • 9. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker container This command is used to perform various operations on the container. Refer to www.docs.docker.com for more info. $ docker container logs $ docker container kill $ docker container rm $ docker container run $ docker container start And so on..
  • 10. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker login This command is used to Login to Docker Hub repo from the CLI $ docker login
  • 11. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker push This command pushes a Docker image on your local repo to the Docker Hub $ docker push vardhanns/MyUbuntuImage
  • 12. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker ps This command lists all the running containers in the host If ‘–a’ flag is specified, shutdown containers are also displayed $ docker ps $ docker ps -a
  • 13. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker stop This command shuts down the container whose Container ID is specified in arguments. Container is shut down gracefully by waiting for other dependencies to shut $ docker stop fe6e370a1c9c
  • 14. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker kill This command kills the container by stopping its execution immediately. Its similar to force kill $ docker kill fe6e370a1c9c
  • 15. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker rm This command removes the container whose Container ID is specified in arguments $ docker rm fe6e370a1c9c
  • 16. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker rmi This command removes the image whose name has been specified in arguments $ docker rmi MyUbuntuImage
  • 17. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker exec This command is used to access an already running container and perform operations inside the container $ docker exec -it fe6e370a1c9c bash
  • 18. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker commit This command creates a new image of an edited container on the local repo $ docker commit fe6e370a1c9c vardhanns/MyModifiedImage
  • 19. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker export This command is used to export a Docker image into a tar file in your local system $ docker export --output=“latest.tar” mycontainer
  • 20. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Docker Commands docker import This command is used to import the contents of a tar file (usually a Docker image) into your local repo $ docker import /home/edureka/Downloads/demo.tgz
  • 21. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Advanced Docker Commands docker compose This command is used to power multi-container applications where various services will be hosted inside different containers $ docker-compose build $ docker-compose up Note: This command is executed in the directory where YAML file is present for building the Compose.
  • 22. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Advanced Docker Commands docker swarm This command creates a network of Docker engines/ hosts to execute containers in parallel (for scaling up & high availability) $ docker swarm init --advertise-addr 192.168.1.100 $ docker swarm join $ docker swarm join-token $ docker swarm leave And so on.. Docker Manager
  • 23. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Advanced Docker Commands docker service This command is used to control any existing Docker service (Containers/Compose/Swarm/Others.. $ docker service ls $ docker service ps $ docker service scale $ docker service stop And so on.. $ docker service logs $ docker service rm
  • 24. WebDriver vs. IDE vs. RC ➢ Data Warehouse is like a relational database designed for analytical needs. ➢ It functions on the basis of OLAP (Online Analytical Processing). ➢ It is a central location where consolidated data from multiple locations (databases) are stored.