SlideShare a Scribd company logo
1 of 21
DOCKER: FROM ZERO TO HERO
Topics of Presentation
• Why Docker?
• Difference between Virtual machine and Docker
• What is Docker
• Docker Architecture
• Docker Installation
• Docker Commands
• Docker Compose
• DockerFile
• Communication between containers
• Swarm
Why Docker?
• Development team on same page in term of
environment
• Development, QA and Production sync up
• Local to Production easy deployment and
scaling
• Build & Deploy, fast & better
Difference between Virtual machine
and Docker
• Containers are an abstraction at the app layer that packages code and
dependencies together.
• Virtual machines (VMs) are an abstraction of physical hardware turning
one server into many servers.
What is Docker
“Docker is a tool designed to make it easier to
create, deploy, and run applications by using
containers. Containers allow a developer to
package up an application with all of the
parts it needs, such as libraries and other
dependencies, and ship it all out as one
package.”
“ Docker Provides the version control of
development/production environment.”
Docker Architecture
• Docker daemon
• Docker client
• Docker registries
• Docker objects
– Images
– Containers
Docker Installation
• Docker for Windows/Mac
• Toolbox for Windows/Mac
– Docker CLI client for running Docker Engine to create
images and containers
– Docker Machine so you can run Docker Engine
commands from Windows terminals
– Docker Compose for running the docker-
compose command
– Kitematic, the Docker GUI
– the Docker QuickStart shell preconfigured for a
Docker command-line environment
– Oracle VM VirtualBox
Cont…
Windows Toolbox URL:
https://docs.docker.com/toolbox/toolbox_insta
ll_windows/
Mac Toolbox URL:
https://docs.docker.com/toolbox/toolbox_insta
ll_mac/
Docker for Windows:
https://www.docker.com/docker-windows
Docker for Mac:
https://www.docker.com/docker-mac
Practical Work
Docker Commands
• Docker Machine:
– docker-machine ls
– docker-machine start [MACHINE_NAME]
– docker-machine stop [MACHINE_NAME]
– docker-machine env [MACHINE_NAME]
– docker-machine ip [MACHINE_NAME]
– docker-machine status[MACHINE_NAME]
Cont…
• Docker Images VS Docker Container :
• Docker Images
– docker pull [IMAGE_NAME] //pulls the image from
hub.docker.com
– docker images // list all images
– docker rmi [IMAGE_NAME] // remove image
– Example
• docker pull nginx:latest
• docker pull mysql:latest
• docker pull php:7.1
Cont…
• Docker Container:
– docker container ps // list running containers
– docker container ps –a // list all containers
– docker rm –f [CONTIANER_NAME] // remove
container
– Example
• docker container run –name nginxServer -p 80:80
nginx
• docker container run –name nginxServer -p 80:80 –v
$(pwd):/usr/share/nginx/html nginx
Cont…
• Set up nginx, PHP 7 and Mysql.
• Run some commands on created Containers:
– docker container top
– docker container inspect
– docker container stats
ANY QUESTIONS?
Docker commands
• Docker Compose:
– docker-compose build
– docker-compose up
– docker-compose down
– docker-compose logs
– docker-compose ps
– docker-compose stop
– docker-compose start
– docker-compose rm
Cont…
• Set up nginx, PHP 7 and Mysql.
Docker File
• Docker File is used to customize the image
ANY QUESTIONS?
Communication between containers
• docker network ls
• docker network inspect [NETWORK_NAME]
• docker network create [NETWORK_NAME]
• docker network rm [NETWORK_NAME]
Scalability and Clustering
THANK YOU 

More Related Content

What's hot

Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker, Inc.
 
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 servicesabhishek chawla
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerLuong Vo
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)Gourav Varma
 
Introduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageIntroduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageejlp12
 
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...Edureka!
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An IntroductionPOSSCON
 
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 introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 
Docker intro
Docker introDocker intro
Docker introOleg Z
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...Simplilearn
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAditya Konarde
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT CampusAjeet Singh Raina
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionRobert Reiz
 

What's hot (20)

Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
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
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
What is Docker
What is DockerWhat is Docker
What is Docker
 
Introduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageIntroduction to Docker storage, volume and image
Introduction to Docker storage, volume and image
 
Docker
DockerDocker
Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker architecture-04-1
Docker architecture-04-1Docker architecture-04-1
Docker architecture-04-1
 
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
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 introduction
Docker introductionDocker introduction
Docker introduction
 
Docker intro
Docker introDocker intro
Docker intro
 
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
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 

Similar to Docker: From Zero to Hero

Dockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec KraloveDockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec Kralovedamovsky
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with dockerMichelle Liu
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )Imo Inyang
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and MicroserviceSamuel Chow
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the Worlddamovsky
 
Docker
DockerDocker
DockerNarato
 
Intro docker and demo monitor on docker
Intro docker and demo monitor on dockerIntro docker and demo monitor on docker
Intro docker and demo monitor on dockerWatcharin Yang-Ngam
 
Rails Applications with Docker
Rails Applications with DockerRails Applications with Docker
Rails Applications with DockerLaura Frank Tacho
 
Docker for developers
Docker for developersDocker for developers
Docker for developersandrzejsydor
 
Introduction to Dockers and containers
Introduction to Dockers and containers Introduction to Dockers and containers
Introduction to Dockers and containers Sri Padaraj M S
 
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...Ido Flatow
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraDaniel Palstra
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerDavid Currie
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsMicael Gallego
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentalsAlper Unal
 

Similar to Docker: From Zero to Hero (20)

Docker toolbox
Docker toolboxDocker toolbox
Docker toolbox
 
Dockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec KraloveDockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec Kralove
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with docker
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and Microservice
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
 
Docker
DockerDocker
Docker
 
Docker slides
Docker slidesDocker slides
Docker slides
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 
Intro docker and demo monitor on docker
Intro docker and demo monitor on dockerIntro docker and demo monitor on docker
Intro docker and demo monitor on docker
 
Rails Applications with Docker
Rails Applications with DockerRails Applications with Docker
Rails Applications with Docker
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Introduction to Dockers and containers
Introduction to Dockers and containers Introduction to Dockers and containers
Introduction to Dockers and containers
 
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel Palstra
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and Docker
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and Jenkins
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Docker: From Zero to Hero

  • 2. Topics of Presentation • Why Docker? • Difference between Virtual machine and Docker • What is Docker • Docker Architecture • Docker Installation • Docker Commands • Docker Compose • DockerFile • Communication between containers • Swarm
  • 3. Why Docker? • Development team on same page in term of environment • Development, QA and Production sync up • Local to Production easy deployment and scaling • Build & Deploy, fast & better
  • 4. Difference between Virtual machine and Docker • Containers are an abstraction at the app layer that packages code and dependencies together. • Virtual machines (VMs) are an abstraction of physical hardware turning one server into many servers.
  • 5. What is Docker “Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.” “ Docker Provides the version control of development/production environment.”
  • 6. Docker Architecture • Docker daemon • Docker client • Docker registries • Docker objects – Images – Containers
  • 7. Docker Installation • Docker for Windows/Mac • Toolbox for Windows/Mac – Docker CLI client for running Docker Engine to create images and containers – Docker Machine so you can run Docker Engine commands from Windows terminals – Docker Compose for running the docker- compose command – Kitematic, the Docker GUI – the Docker QuickStart shell preconfigured for a Docker command-line environment – Oracle VM VirtualBox
  • 8. Cont… Windows Toolbox URL: https://docs.docker.com/toolbox/toolbox_insta ll_windows/ Mac Toolbox URL: https://docs.docker.com/toolbox/toolbox_insta ll_mac/ Docker for Windows: https://www.docker.com/docker-windows Docker for Mac: https://www.docker.com/docker-mac
  • 10. Docker Commands • Docker Machine: – docker-machine ls – docker-machine start [MACHINE_NAME] – docker-machine stop [MACHINE_NAME] – docker-machine env [MACHINE_NAME] – docker-machine ip [MACHINE_NAME] – docker-machine status[MACHINE_NAME]
  • 11. Cont… • Docker Images VS Docker Container : • Docker Images – docker pull [IMAGE_NAME] //pulls the image from hub.docker.com – docker images // list all images – docker rmi [IMAGE_NAME] // remove image – Example • docker pull nginx:latest • docker pull mysql:latest • docker pull php:7.1
  • 12. Cont… • Docker Container: – docker container ps // list running containers – docker container ps –a // list all containers – docker rm –f [CONTIANER_NAME] // remove container – Example • docker container run –name nginxServer -p 80:80 nginx • docker container run –name nginxServer -p 80:80 –v $(pwd):/usr/share/nginx/html nginx
  • 13. Cont… • Set up nginx, PHP 7 and Mysql. • Run some commands on created Containers: – docker container top – docker container inspect – docker container stats
  • 15. Docker commands • Docker Compose: – docker-compose build – docker-compose up – docker-compose down – docker-compose logs – docker-compose ps – docker-compose stop – docker-compose start – docker-compose rm
  • 16. Cont… • Set up nginx, PHP 7 and Mysql.
  • 17. Docker File • Docker File is used to customize the image
  • 19. Communication between containers • docker network ls • docker network inspect [NETWORK_NAME] • docker network create [NETWORK_NAME] • docker network rm [NETWORK_NAME]

Editor's Notes

  1. Because the Docker Engine daemon uses Linux-specific kernel features, you can’t run Docker Engine natively on Windows. Instead, you must use the Docker Machine command, docker-machine, to create and attach to a small Linux VM on your machine. This VM hosts Docker Engine for you on your Windows system. https://docs.docker.com/toolbox/toolbox_install_windows/
  2. This is another option for an Overview slides using transitions.
  3. Docker pull [IMAGE_NAME] commands pulls the image from hub.docker.com.
  4. Docker pull [IMAGE_NAME] commands pulls the image from hub.docker.com.
  5. 1) docker container run --net laravel --name mysqlserver -e MYSQL_ROOT_PASSWORD=root -e MYSQL_USER=root -d mysql --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci 2) docker container run -d --name webserver -p 8080:80 --net laravel -v /c/Users/fara/projects/:/usr/share/nginx/html -v /c/Users/fara/projects/site.conf:/etc/nginx/conf.d/site.conf:ro nginx 3) docker container run -d --name php7 --net laravel -v /c/Users/fazal/projects/:/usr/share/nginx/html php:7.1-fpm 4) docker exec -it <container ID> docker-php-ext-install pdo pdo_mysql
  6. Microsoft Confidential
  7. # PHP version: '2' services: php: build: context: . dockerfile: php.dockerfile volumes: - ./:/usr/share/nginx/html links: - mysqlserver restart: always webserver: image: nginx ports: - "8080:80" volumes: - ./:/usr/share/nginx/html - ./site.conf:/etc/nginx/conf.d/site_new.conf:ro links: - php depends_on: - php restart: always # MYSQL mysqlserver: image: mysql ports: - "3306:3306" environment: MYSQL_ROOT_PASSWORD: root MYSQL_USER: root #MYSQL_PASSWORD: root #MYSQL_DATABASE: database restart: always
  8. FROM php:7.1-fpm RUN docker-php-ext-install pdo pdo_mysql
  9. Microsoft Confidential
  10. Microsoft Confidential