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

PPTX
Docker Container Security
PDF
Hands-On Introduction to Kubernetes at LISA17
PDF
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
PDF
Introduction to Docker storage, volume and image
PPTX
DevOps with Kubernetes
PDF
Kubernetes - A Comprehensive Overview
PDF
Evolution of containers to kubernetes
PPTX
Docker: From Zero to Hero
Docker Container Security
Hands-On Introduction to Kubernetes at LISA17
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
Introduction to Docker storage, volume and image
DevOps with Kubernetes
Kubernetes - A Comprehensive Overview
Evolution of containers to kubernetes
Docker: From Zero to Hero

What's hot (20)

PPTX
Docker Networking Overview
PDF
Networking in Docker
PPTX
Kubernetes Introduction
PDF
Kubernetes dealing with storage and persistence
PDF
An Introduction to Kubernetes
PDF
Kubernetes: A Short Introduction (2019)
PPTX
Getting started with Docker
PPT
Docker introduction
PDF
Docker Registry V2
PDF
Docker Introduction
PDF
Kubernetes Basics
PPTX
Kubernetes Networking 101
PPTX
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
PPTX
Docker.pptx
PDF
Introduction to Docker Compose
PDF
Introduction to Docker - VIT Campus
PPTX
Docker introduction
PDF
Kubernetes Networking
PDF
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
PPTX
Docker introduction for the beginners
Docker Networking Overview
Networking in Docker
Kubernetes Introduction
Kubernetes dealing with storage and persistence
An Introduction to Kubernetes
Kubernetes: A Short Introduction (2019)
Getting started with Docker
Docker introduction
Docker Registry V2
Docker Introduction
Kubernetes Basics
Kubernetes Networking 101
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
Docker.pptx
Introduction to Docker Compose
Introduction to Docker - VIT Campus
Docker introduction
Kubernetes Networking
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker introduction for the beginners
Ad

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

PDF
Docker.pdf
PPTX
Primi passi con Docker - ItalianCoders - 12-01-2021
PDF
Docker by Example - Basics
PDF
A Hands-on Introduction to Docker
PDF
Docker
PDF
PDF
Docker Essentials Workshop— Innovation Labs July 2020
PPTX
PDF
Docker by Example - Basics
ODP
Docker Basics
PPTX
docker technology in INTERNET WORLD.pptx
PDF
DockerCon SF 2015: Getting Started w/ Docker
PDF
Introduction to Docker - Learning containerization XP conference 2016
PPTX
Docker advance1
PDF
Docker introduction - Part 1
PDF
Dockers Containers in action Slide 0 to hero
PPTX
Docker advance topic
PPTX
Docker Starter Pack
PDF
Lab docker
PDF
Docker 101 - Intro to Docker
Docker.pdf
Primi passi con Docker - ItalianCoders - 12-01-2021
Docker by Example - Basics
A Hands-on Introduction to Docker
Docker
Docker Essentials Workshop— Innovation Labs July 2020
Docker by Example - Basics
Docker Basics
docker technology in INTERNET WORLD.pptx
DockerCon SF 2015: Getting Started w/ Docker
Introduction to Docker - Learning containerization XP conference 2016
Docker advance1
Docker introduction - Part 1
Dockers Containers in action Slide 0 to hero
Docker advance topic
Docker Starter Pack
Lab docker
Docker 101 - Intro to Docker
Ad

More from Edureka! (20)

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

Recently uploaded (20)

PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Cloud computing and distributed systems.
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
PDF
DevOps & Developer Experience Summer BBQ
PDF
Newfamily of error-correcting codes based on genetic algorithms
PPTX
MYSQL Presentation for SQL database connectivity
PDF
KodekX | Application Modernization Development
PPTX
Big Data Technologies - Introduction.pptx
PDF
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
PPTX
CroxyProxy Instagram Access id login.pptx
PDF
Transforming Manufacturing operations through Intelligent Integrations
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
NewMind AI Monthly Chronicles - July 2025
Understanding_Digital_Forensics_Presentation.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Cloud computing and distributed systems.
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
DevOps & Developer Experience Summer BBQ
Newfamily of error-correcting codes based on genetic algorithms
MYSQL Presentation for SQL database connectivity
KodekX | Application Modernization Development
Big Data Technologies - Introduction.pptx
AI And Its Effect On The Evolving IT Sector In Australia - Elevate
CroxyProxy Instagram Access id login.pptx
Transforming Manufacturing operations through Intelligent Integrations
“AI and Expert System Decision Support & Business Intelligence Systems”
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Review of recent advances in non-invasive hemoglobin estimation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
madgavkar20181017ppt McKinsey Presentation.pdf

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.