SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Getting started with Docker
By
Adnan Siddiqi(http://adnansiddiqi.me)
What is Docker?
From Wikipedia:
Docker is a computer program that performs
operating-system-level virtualization, also
known as “containerization”.[6] It was first
released in 2013 and is developed by
Docker, Inc.[7]
Attempts before Docker
Virtual Box
Attempts before Docker(Contd..)
Vagrant
What Docker did?
• Light-weight containers.
• Allowed developers to use latest softwares
efficiently even if they were not compatible
with their machines.
• Mimic a scalable scenario on a developer by
running multiple containers for a server.
• Deployable. No more “It runs on my machine”
excuse.
Architecture
• Client/Server architecture.
• dockerd daemon that is responsble to connect
client with server.
• The docker client could interact with a remote
daemon as well.
Architecture(Contd..)
Architecture(Contd..)
Images
• A template consists of instructions how a
container should be created.
• Think of it a recipe that consists of instructions
that how to use ingredients to make a dish.
• Every image is based on a base image which
usually belongs to an operating system(e.g.
Java image is based on Ubuntu OS image).
• Dockerfile is used to put all instructions for
image creation.
Architecture(Contd..)
Containers
• Containers are an abstraction at the app layer
that packages code and dependencies together.
• Running instance of the image.
• Think of it as a dish prepared with the help of a
recipe. So whatever you put in your Dockerfile,
you see the output of it in your container.
• The idea of containers taken from shipping
containers
Architecture(Contd..)
Containers
Architecture(Contd..)
• Repositories which store images.
• Docker Hub as a public
registry(https://hub.docker.com/).
• Docker commands run, pull and, build are
used to acquire and use images.
Installation
• Available for Linux, OSX and Windows.
• Certain requirements for using Docker for
Windows on Windows OS like Hyper-V
enabled and Windows 10 Pro installed. More
from here(https://docs.docker.com/docker-
for-windows/install/#start-docker-for-
windows).
• OSX (https://docs.docker.com/docker-for-
mac/install/)
Creating Dockerfile
Building image
• docker build -t tut:php_img .
• In name:tag format where tut is the name and
php_img is the tag.
Running image
• docker run -p 8000:80
tut:php_img
• In name:tag format where tut is the name and
php_img is the tag.
• docker run -p 8000:80 -v
/path/to/src:/var/www/html/ tut:php_img
Demo

Weitere ähnliche Inhalte

Was ist angesagt?

Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
Docker, Inc.
 

Was ist angesagt? (20)

Docker on azure
Docker on azureDocker on azure
Docker on azure
 
Containerization using docker
Containerization using dockerContainerization using docker
Containerization using docker
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Docker
DockerDocker
Docker
 
Docker 101 for Developer
Docker 101 for DeveloperDocker 101 for Developer
Docker 101 for Developer
 
What is Docker
What is DockerWhat is Docker
What is Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker intro
Docker introDocker intro
Docker intro
 
Docker
DockerDocker
Docker
 
Docker architecture-04-1
Docker architecture-04-1Docker architecture-04-1
Docker architecture-04-1
 
Windows server containers
Windows server containersWindows server containers
Windows server containers
 
Docker Basic Presentation
Docker Basic PresentationDocker Basic Presentation
Docker Basic Presentation
 
Intro to docker
Intro to dockerIntro to docker
Intro to docker
 
Docker Fundamentals
Docker FundamentalsDocker Fundamentals
Docker Fundamentals
 
Introduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @TwitterIntroduction to Docker - Docker workshop @Twitter
Introduction to Docker - Docker workshop @Twitter
 
Docker cheat-sheet
Docker cheat-sheetDocker cheat-sheet
Docker cheat-sheet
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
DCA. certificate slide Session 1
DCA. certificate slide Session 1DCA. certificate slide Session 1
DCA. certificate slide Session 1
 

Ähnlich wie Learning Dockers - Step by Step

Ähnlich wie Learning Dockers - Step by Step (20)

Docker slides
Docker slidesDocker slides
Docker slides
 
Docker
DockerDocker
Docker
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Introduction to Dockers.pptx
Introduction to Dockers.pptxIntroduction to Dockers.pptx
Introduction to Dockers.pptx
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )
 
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 for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
Introduction to Containers & Diving a little deeper into the benefits of Con...
 Introduction to Containers & Diving a little deeper into the benefits of Con... Introduction to Containers & Diving a little deeper into the benefits of Con...
Introduction to Containers & Diving a little deeper into the benefits of Con...
 
Docker : Container Virtualization
Docker : Container VirtualizationDocker : Container Virtualization
Docker : Container Virtualization
 
Let's dockerize
Let's dockerizeLet's dockerize
Let's dockerize
 
Docker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldDocker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container world
 
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
 
Docker interview Questions-1.pdf
Docker interview Questions-1.pdfDocker interview Questions-1.pdf
Docker interview Questions-1.pdf
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
 
Docker interview Questions-2.pdf
Docker interview Questions-2.pdfDocker interview Questions-2.pdf
Docker interview Questions-2.pdf
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
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
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with docker
 

Mehr von Adnan Siddiqi (6)

Map filter reduce in Python
Map filter reduce in PythonMap filter reduce in Python
Map filter reduce in Python
 
Python Decorators
Python DecoratorsPython Decorators
Python Decorators
 
Python Advance Tutorial - Advance Functions
Python Advance Tutorial - Advance FunctionsPython Advance Tutorial - Advance Functions
Python Advance Tutorial - Advance Functions
 
Exception handling in Python
Exception handling in PythonException handling in Python
Exception handling in Python
 
Tips every developer should know to improve site performance
Tips every developer should know to improve site performanceTips every developer should know to improve site performance
Tips every developer should know to improve site performance
 
Apache cassandra
Apache cassandraApache cassandra
Apache cassandra
 

Kürzlich hochgeladen

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
 
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
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (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...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
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
 
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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 

Learning Dockers - Step by Step

  • 1. Getting started with Docker By Adnan Siddiqi(http://adnansiddiqi.me)
  • 2. What is Docker? From Wikipedia: Docker is a computer program that performs operating-system-level virtualization, also known as “containerization”.[6] It was first released in 2013 and is developed by Docker, Inc.[7]
  • 5. What Docker did? • Light-weight containers. • Allowed developers to use latest softwares efficiently even if they were not compatible with their machines. • Mimic a scalable scenario on a developer by running multiple containers for a server. • Deployable. No more “It runs on my machine” excuse.
  • 6. Architecture • Client/Server architecture. • dockerd daemon that is responsble to connect client with server. • The docker client could interact with a remote daemon as well.
  • 8. Architecture(Contd..) Images • A template consists of instructions how a container should be created. • Think of it a recipe that consists of instructions that how to use ingredients to make a dish. • Every image is based on a base image which usually belongs to an operating system(e.g. Java image is based on Ubuntu OS image). • Dockerfile is used to put all instructions for image creation.
  • 9. Architecture(Contd..) Containers • Containers are an abstraction at the app layer that packages code and dependencies together. • Running instance of the image. • Think of it as a dish prepared with the help of a recipe. So whatever you put in your Dockerfile, you see the output of it in your container. • The idea of containers taken from shipping containers
  • 11. Architecture(Contd..) • Repositories which store images. • Docker Hub as a public registry(https://hub.docker.com/). • Docker commands run, pull and, build are used to acquire and use images.
  • 12. Installation • Available for Linux, OSX and Windows. • Certain requirements for using Docker for Windows on Windows OS like Hyper-V enabled and Windows 10 Pro installed. More from here(https://docs.docker.com/docker- for-windows/install/#start-docker-for- windows). • OSX (https://docs.docker.com/docker-for- mac/install/)
  • 14.
  • 15. Building image • docker build -t tut:php_img . • In name:tag format where tut is the name and php_img is the tag.
  • 16. Running image • docker run -p 8000:80 tut:php_img • In name:tag format where tut is the name and php_img is the tag. • docker run -p 8000:80 -v /path/to/src:/var/www/html/ tut:php_img
  • 17. Demo