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 introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
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!
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerInstruqt
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAditya Konarde
 
Docker intro
Docker introDocker intro
Docker introOleg Z
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerLuong Vo
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker, Inc.
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)Gourav Varma
 
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 SlidesDocker, Inc.
 
Containerization and Docker
Containerization and DockerContainerization and Docker
Containerization and DockerMegha Bansal
 
Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 
Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginnersJuneyoung Oh
 
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 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 

What's hot (20)

Docker
DockerDocker
Docker
 
What is Docker
What is DockerWhat is Docker
What is Docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
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...
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker intro
Docker introDocker intro
Docker intro
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
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
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
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
 
Containerization and Docker
Containerization and DockerContainerization and Docker
Containerization and Docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginners
 
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 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 

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

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
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 FMESafe Software
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

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