SlideShare a Scribd company logo
1 of 24
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

Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Simplilearn
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
Docker, Inc.
 

What's hot (20)

What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
 
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
 
What is Docker?
What is Docker?What is Docker?
What is Docker?
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker SlidesDocker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker Slides
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
What is Docker
What is DockerWhat is Docker
What is Docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Virtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management servicesVirtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management services
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 

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

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

Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
Docker Command Line, Using and Choosing containers
Docker Command Line, Using and Choosing containers Docker Command Line, Using and Choosing containers
Docker Command Line, Using and Choosing containers
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruDeploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
 
Primi passi con Docker - ItalianCoders - 12-01-2021
Primi passi con Docker - ItalianCoders - 12-01-2021Primi passi con Docker - ItalianCoders - 12-01-2021
Primi passi con Docker - ItalianCoders - 12-01-2021
 
Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker Container
 
Introduction to Docker - Learning containerization XP conference 2016
Introduction to Docker - Learning containerization  XP conference 2016Introduction to Docker - Learning containerization  XP conference 2016
Introduction to Docker - Learning containerization XP conference 2016
 
Docker Swarm For High Availability | Docker Tutorial | DevOps Tutorial | Edureka
Docker Swarm For High Availability | Docker Tutorial | DevOps Tutorial | EdurekaDocker Swarm For High Availability | Docker Tutorial | DevOps Tutorial | Edureka
Docker Swarm For High Availability | Docker Tutorial | DevOps Tutorial | Edureka
 
Docker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps DevelopmentDocker: A New Way to Turbocharging Your Apps Development
Docker: A New Way to Turbocharging Your Apps Development
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
 
Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)
 
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth RushgroveThe Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker Swarm & Machine
Docker Swarm & MachineDocker Swarm & Machine
Docker Swarm & Machine
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
 
A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 
Dockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekDockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to Geek
 

More from Edureka!

More from Edureka! (20)

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

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 

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.