SlideShare uma empresa Scribd logo
1 de 36
Introduction to Docker
What is it? And Why Should I Care?
PRESENTATION BY: ALAN FORBES
Am I in the right place?
Meet Today’s Presenter
Alan Forbes
Vice President of Product Management
aforbes@rprwyatt.com
Proud IBMAdvanced Business
Partners for
18Years
Agenda - Docker
• What it is
• How it works
• Turbo Demo!
• Why you should care
What is Docker?
In jargon, it’s a software container platform
It provides abstraction of operating system level virtualization
What’s in a container?
• The operating system
• Your software
• The dependencies required to run your
software (PHP, Mongo, mySQL,
Python, Apache, Node, etc.)
• Environment variables
• Your code
• more
What problem does Docker solve?
• It runs on my machine, but not on yours…
• Don’t run it on your machine, run it in a container. Then when you share the container, it will work
• Specifically, Docker makes it possible to set up local development environments that are exactly like a live
server
• Also solves the issue of getting more out of existing hardware
Buil
d
Ship Run
Container vs VM (words)
• A virtual machine will include the application, the necessary binaries
and libraries, and an entire operating system (many GBs)
• A Docker container also contains the application and necessary
libraries, but shares the OS kernel with other containers.
• Docker containers run in an isolated process space.
• Guest OS layer is completely eliminated.
• Docker Engine can set on top of Linux, Mac,Windows, Azure, AWS,
etc.
Containers vs Virtual Machine (visual)
Every container shares the core
• With traditionalVMs you can mix and match OS
• This is super flexible, but hardware heavy
• Resources are allocated at provision time
• With Docker, all the containers run on top of same operating system
and kernel.
• If multiple copies of the same application are what you want, then you'll love
containers.
• Docker gets the most server application instances running on the least amount
of hardware
Which OS is shared?
• Docker can run on Mac,Windows, Linux
• The Docker Engine shared OS is a flavor of Linux
• In general, Docker containers run Linux (even when running on
Windows)
• However… onWindows Server 2016 andWindows 10 (Anniversary
Edition) only you can runWindows server containers, which allow for
.NET, ASP.NET, PowerShell, etc.
• Nano server, .NET Core
Containers can run almost anywhere
• Desktop - Mac andWindows
• Cloud Providers
• IBM Bluemix
• AWS
• Azure
• Servers
• CentOS, Debian, Fedora
• Oracle Linux, Red Hat, Ubuntu, etc
But my software isn’t quite done…
• Software is never finished
• Dependencies change over time
• Docker thought of this. It has “git like” versioning to track successive versions of a
container, inspect the differences between versions, commit new versions, roll back, etc.
• Who made that change and when?
• Incremental changes (download just the differences, not a new container)
Build Ship Run
Component Reuse
• Any container can be saved as a “base image”
from which other containers can be built.
• Containers can be built on top of each other
(will explain).
• The best part is that these containers can be
created as part of an automated script.
Getting started – www.docker.com
Simple Dockerfile – Image Definition
FROM php:7.0-apache
COPY src/ /var/www/html/
EXPOSE 80
• Note we don’t have to start from scratch; we’re building on top of
an existing image pre-configured with PHP and Apache
FROM the Public Repository @ Hub.docker.com
How to use the image
Containers are stacked
• 3 line docker file, starts with FROM
• Docker pulled an image from the public
repository
• That image also contains a From,
which may contain another
• FROM debian:jessie
• FROM scratch
Add our code: Hello World
<?php
Echo "hello Social Connections! Today is ". date('l jS of FY h:i:s A'); ?>
Run command:
docker run -p 80:80 -v /Users/alan/docker/src/:/var/www/html hello-
world
All files copied to the container
• A container is an instance of the image
• But if a source file changes, you have to stop and rebuild the
container (Deploy)
• Unless you mount a volume; in this case the files are not part of the
container (Dev)
Life of a container
• The container will run until the main process stops
• In our case, if PHP crashes
• The life of a container is tied to a single process
• Thus, try to keep containers to a single main process
• Rather than run PHP and my SQL on a single container, run two
containers
• You can stop them manually with ctrl-c
Basic Docker Commands
• docker run <image> - creates a new container based on an image
• docker start <name | ID> - starts an existing container
• docker stop <name | ID> - stops an existing, running container
• docker ps - list all containers [-a include all containers, even stopped
ones]
• docker rm <name | ID> - deletes a container
Quick Review
• Installed Docker
• Found a suitable image on Docker hub
• An image is a text file describing what goes into a container
• Created a container using that image PLUS our own code
• A container is an instance of an image
• Built the container and ran it
• Files change – either rebuild the container or “mount” a volume
instead
• Limit containers to a single process / purpose
Docker Compose
• Each container should provide a single service
• An app may need several containers that need to work together
• Keeping track of the status of multiple containers can be a pain in a
complex application (lots of command line parameters)
• Docker Compose allows you to start and stop groups of containers
as one unit
The scenario – 2 related containers
• Web page running onApache
• Web API running some scripting language (Python, PHP, etc)
docker-compose.yml
• SeeVisual Code
Real life plus a shameless plug 
The scenario – 3 related containers
• Apache with PHP plus custom code
• mySQL
• phpMyAdmin
docker-compose.yml
Add mySQL
docker-compose up
So why should I care?
• At first, I thought to myself “I already know enough technology, how
could this thing possibly matter?”
• BUT… it does matter:
• Docker is a better solution for many problems
• It’s pretty easy to learn
• IBM is adopting it like crazy, as are many other companies
• It’s cool and hip… like you
• It’s significantly faster - MongoDB (5 steps or 1?)
IBM & Docker Together
• Docker Subscription for IBM
• DockerTrusted Registry: Dedicated image store and distribution
service deployed behind your firewall
• Docker Engine: Push/pull images, build and run containers
• IBM Level 1 and 2 support
• Integrated with UrbanCode Deploy for integrated release
management
Docker is a big deal
Thank you!
• Questions? Come visit my booth!
• aforbes@rprwyatt.com

Mais conteúdo relacionado

Mais procurados

Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
John Willis
 

Mais procurados (20)

A Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things ContainersA Gentle Introduction To Docker And All Things Containers
A Gentle Introduction To Docker And All Things Containers
 
Docker based-pipelines
Docker based-pipelinesDocker based-pipelines
Docker based-pipelines
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Docker - introduction
Docker - introductionDocker - introduction
Docker - introduction
 
Start your adventure with docker
Start your adventure with dockerStart your adventure with docker
Start your adventure with docker
 
Docker introduction for Carbon IT
Docker introduction for Carbon ITDocker introduction for Carbon IT
Docker introduction for Carbon IT
 
Docker basics
Docker basicsDocker basics
Docker basics
 
Shipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with DockerShipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with Docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
 
Introduction To Docker
Introduction To DockerIntroduction To Docker
Introduction To Docker
 
Basic docker for developer
Basic docker for developerBasic docker for developer
Basic docker for developer
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQIntroduction to Docker and all things containers, Docker Meetup at RelateIQ
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
 
Docker
DockerDocker
Docker
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Understand how docker works
Understand how docker worksUnderstand how docker works
Understand how docker works
 
Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017
 

Semelhante a Introduction to Docker

Semelhante a Introduction to Docker (20)

eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
 
Docker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to DockerDocker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to Docker
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 
Docker interview Questions-1.pdf
Docker interview Questions-1.pdfDocker interview Questions-1.pdf
Docker interview Questions-1.pdf
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
 
Cassandra and Docker Lessons Learned
Cassandra and Docker Lessons LearnedCassandra and Docker Lessons Learned
Cassandra and Docker Lessons Learned
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and Docker
 
Docker basic
Docker basicDocker basic
Docker basic
 
You, and Me, and Docker Makes Three
You, and Me, and Docker Makes ThreeYou, and Me, and Docker Makes Three
You, and Me, and Docker Makes Three
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Michigan IT Symposium 2017 - Container BOF
Michigan IT Symposium 2017 - Container BOFMichigan IT Symposium 2017 - Container BOF
Michigan IT Symposium 2017 - Container BOF
 
An introduction to configuring Domino for Docker
An introduction to configuring Domino for DockerAn introduction to configuring Domino for Docker
An introduction to configuring Domino for Docker
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Introduction to Docker

  • 1. Introduction to Docker What is it? And Why Should I Care? PRESENTATION BY: ALAN FORBES
  • 2. Am I in the right place?
  • 3. Meet Today’s Presenter Alan Forbes Vice President of Product Management aforbes@rprwyatt.com Proud IBMAdvanced Business Partners for 18Years
  • 4. Agenda - Docker • What it is • How it works • Turbo Demo! • Why you should care
  • 5. What is Docker? In jargon, it’s a software container platform It provides abstraction of operating system level virtualization
  • 6. What’s in a container? • The operating system • Your software • The dependencies required to run your software (PHP, Mongo, mySQL, Python, Apache, Node, etc.) • Environment variables • Your code • more
  • 7. What problem does Docker solve? • It runs on my machine, but not on yours… • Don’t run it on your machine, run it in a container. Then when you share the container, it will work • Specifically, Docker makes it possible to set up local development environments that are exactly like a live server • Also solves the issue of getting more out of existing hardware Buil d Ship Run
  • 8. Container vs VM (words) • A virtual machine will include the application, the necessary binaries and libraries, and an entire operating system (many GBs) • A Docker container also contains the application and necessary libraries, but shares the OS kernel with other containers. • Docker containers run in an isolated process space. • Guest OS layer is completely eliminated. • Docker Engine can set on top of Linux, Mac,Windows, Azure, AWS, etc.
  • 9. Containers vs Virtual Machine (visual)
  • 10. Every container shares the core • With traditionalVMs you can mix and match OS • This is super flexible, but hardware heavy • Resources are allocated at provision time • With Docker, all the containers run on top of same operating system and kernel. • If multiple copies of the same application are what you want, then you'll love containers. • Docker gets the most server application instances running on the least amount of hardware
  • 11. Which OS is shared? • Docker can run on Mac,Windows, Linux • The Docker Engine shared OS is a flavor of Linux • In general, Docker containers run Linux (even when running on Windows) • However… onWindows Server 2016 andWindows 10 (Anniversary Edition) only you can runWindows server containers, which allow for .NET, ASP.NET, PowerShell, etc. • Nano server, .NET Core
  • 12. Containers can run almost anywhere • Desktop - Mac andWindows • Cloud Providers • IBM Bluemix • AWS • Azure • Servers • CentOS, Debian, Fedora • Oracle Linux, Red Hat, Ubuntu, etc
  • 13. But my software isn’t quite done… • Software is never finished • Dependencies change over time • Docker thought of this. It has “git like” versioning to track successive versions of a container, inspect the differences between versions, commit new versions, roll back, etc. • Who made that change and when? • Incremental changes (download just the differences, not a new container) Build Ship Run
  • 14. Component Reuse • Any container can be saved as a “base image” from which other containers can be built. • Containers can be built on top of each other (will explain). • The best part is that these containers can be created as part of an automated script.
  • 15. Getting started – www.docker.com
  • 16. Simple Dockerfile – Image Definition FROM php:7.0-apache COPY src/ /var/www/html/ EXPOSE 80 • Note we don’t have to start from scratch; we’re building on top of an existing image pre-configured with PHP and Apache
  • 17. FROM the Public Repository @ Hub.docker.com
  • 18. How to use the image
  • 19. Containers are stacked • 3 line docker file, starts with FROM • Docker pulled an image from the public repository • That image also contains a From, which may contain another • FROM debian:jessie • FROM scratch
  • 20. Add our code: Hello World <?php Echo "hello Social Connections! Today is ". date('l jS of FY h:i:s A'); ?> Run command: docker run -p 80:80 -v /Users/alan/docker/src/:/var/www/html hello- world
  • 21. All files copied to the container • A container is an instance of the image • But if a source file changes, you have to stop and rebuild the container (Deploy) • Unless you mount a volume; in this case the files are not part of the container (Dev)
  • 22. Life of a container • The container will run until the main process stops • In our case, if PHP crashes • The life of a container is tied to a single process • Thus, try to keep containers to a single main process • Rather than run PHP and my SQL on a single container, run two containers • You can stop them manually with ctrl-c
  • 23. Basic Docker Commands • docker run <image> - creates a new container based on an image • docker start <name | ID> - starts an existing container • docker stop <name | ID> - stops an existing, running container • docker ps - list all containers [-a include all containers, even stopped ones] • docker rm <name | ID> - deletes a container
  • 24. Quick Review • Installed Docker • Found a suitable image on Docker hub • An image is a text file describing what goes into a container • Created a container using that image PLUS our own code • A container is an instance of an image • Built the container and ran it • Files change – either rebuild the container or “mount” a volume instead • Limit containers to a single process / purpose
  • 25. Docker Compose • Each container should provide a single service • An app may need several containers that need to work together • Keeping track of the status of multiple containers can be a pain in a complex application (lots of command line parameters) • Docker Compose allows you to start and stop groups of containers as one unit
  • 26. The scenario – 2 related containers • Web page running onApache • Web API running some scripting language (Python, PHP, etc)
  • 28. Real life plus a shameless plug 
  • 29. The scenario – 3 related containers • Apache with PHP plus custom code • mySQL • phpMyAdmin
  • 33. So why should I care? • At first, I thought to myself “I already know enough technology, how could this thing possibly matter?” • BUT… it does matter: • Docker is a better solution for many problems • It’s pretty easy to learn • IBM is adopting it like crazy, as are many other companies • It’s cool and hip… like you • It’s significantly faster - MongoDB (5 steps or 1?)
  • 34. IBM & Docker Together • Docker Subscription for IBM • DockerTrusted Registry: Dedicated image store and distribution service deployed behind your firewall • Docker Engine: Push/pull images, build and run containers • IBM Level 1 and 2 support • Integrated with UrbanCode Deploy for integrated release management
  • 35. Docker is a big deal
  • 36. Thank you! • Questions? Come visit my booth! • aforbes@rprwyatt.com

Notas do Editor

  1. https://www.youtube.com/watch?v=YFl2mCHdv24