SlideShare a Scribd company logo
1 of 25
Vagrant and Docker
Portable Development Environments
Who we are
Feroj Bepari
Senior Software Engineer
Nascenia Ltd.
feroj@nascenia.com
Samiul Hoque
Senior Software Engineer
Nascenia Ltd.
samiul@nascenia.com
2
Development environments
made easy
Create and configure lightweight,
reproducible, and portable
development environments.
3
What Vagrant is
❏Development environment setup tool
❏Focused on automation
❏Lowers development environment setup time
❏Development - Production parity
❏No more “Works on my machine” excuses
4
Why Vagrant
❏Easy to configure
❏Reproducible and portable
❏Single consistent workflow
❏Industry-standard tools integration
5
Benefits of Vagrant
❏Isolate dependencies and their configuration
❏A single disposable, consistent environment
❏Creates a single Vagrantfile for a project and share with other
developer/designers
❏Others just need to run vagrant up and everything is installed and
configured for work.
6
Installation
❏ Download and Install
VirtualBox
https://www.virtualbox.org/wiki/Downloads
❏ Download and Install Vagrant
http://www.vagrantup.com/downloads
7
Let us create a VM
❏ Ubuntu Server 14.04 (trusty64)
❏ Git
❏ LAMP Stack
❏ Composer
❏ Node
❏ Redis
❏ Memcached
❏ Beanstalkd
❏ Supervisor
❏ PHPMyAdmin
❏ The Web Application:
➭ A laravel installation
➭ A mysql database for the
application
➭ Queue configuration
8
Initializing Vagrant
9
❏mkdir vagrant-test
❏cd vagrant-test
❏laravel new testvagrant
A fresh laravel will be installed in testvagrant directory.
❏vagrant init
A new Vagrantfile will be placed in the vagrant-test directory.
❏vagrant up
Updating Host OS Names Hosts File
10
Access the Sample Vagrant Project
The sample file is accessible at
https://github.com/samiuln/vagrant-test
11
Provisioners
❏Shell Scripts
❏Puppet
❏Chef
12
❏Ansible
❏Salt
❏Docker
An open platform for
distributed applications for
developers and sysadmins
Build, Ship, Run
13
What Docker is
❏High level
❏ A lightweight VM
❏ Own process space
❏ Own network interface
❏ Can run stuff as root
14
❏Low level
❏ Container = isolated processes
❏ Share kernel with host
❏ <<application container>>
Why Docker
❏Run everywhere
❏ Regardless of kernel version
❏ Regardless of host distro
❏ Physical or virtual, cloud or not
❏ Container and host architecture
must match...
15
❏Run anything
❏ If it can run on the host, it can run
in the container
❏ If it can run on a Linux kernel, it
can run
VMs vs. Containers
16
Why Container are Lightweight
17
Install Docker
❏Go to https://docs.docker.com/engine/installation/
❏sudo docker run hello-world
18
Docker Hub
❏More than 100,000 public images
❏Push your image to public repository
❏Use anywhere, any time :)
❏https://hub.docker.com/
19
Demo
❏Run mysql docker image from Docker hub
❏ docker run --name wordpressdb -e MYSQL_ROOT_PASSWORD=password -e
MYSQL_DATABASE=wordpress -d mysql:5.7
❏Pull wordpress from docker hub
❏ docker pull wordpress
❏Run wordpress container from local
❏ docker run -e WORDPRESS_DB_PASSWORD=password -d --name wordpress --link
wordpressdb:mysql wordpress
20
Demo (contd.)
❏Show all docker container
❏ docker ps, docker ps -a
❏Inspect wordpress configuration
❏ docker inspect wordpress
21
Demo (contd.)
❏Where is my SOURCE CODE? :(
❏ docker run -e WORDPRESS_DB_PASSWORD=password -d --name
wordpress --link wordpressdb:mysql -p
127.0.0.2:8080:80 -v "$PWD/":/var/www/html wordpress
❏ TIRED typing command?
❏ Docker has a solution :)
22
Resources
❏https://github.com/ferojnascenia/docker-compose-wordpress/
❏https://hub.docker.com/
❏http://www.sitepoint.com/how-to-use-the-official-docker-wordpress-
image/
23
24
25

More Related Content

What's hot

What's hot (20)

TypeScript - Javascript done right
TypeScript - Javascript done rightTypeScript - Javascript done right
TypeScript - Javascript done right
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Bootstrapping Quality
Bootstrapping QualityBootstrapping Quality
Bootstrapping Quality
 
Continous integration with jenkins
Continous integration with jenkinsContinous integration with jenkins
Continous integration with jenkins
 
Agile .NET Development with BDD and Continuous Integration
Agile .NET Development with BDD and Continuous IntegrationAgile .NET Development with BDD and Continuous Integration
Agile .NET Development with BDD and Continuous Integration
 
PHP - Programming language war, does it matter
PHP - Programming language war, does it matterPHP - Programming language war, does it matter
PHP - Programming language war, does it matter
 
Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Angular2.0@Shanghai0319
Angular2.0@Shanghai0319
 
Continuous Delivery with VS2015 and TFS2015
Continuous Delivery with VS2015 and TFS2015Continuous Delivery with VS2015 and TFS2015
Continuous Delivery with VS2015 and TFS2015
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you code
 
BDD with Cucumber
BDD with CucumberBDD with Cucumber
BDD with Cucumber
 
DevSecCon Tel Aviv 2018 - Security Testing for Containerised Apps by Omer Levi
DevSecCon Tel Aviv 2018 - Security Testing for  Containerised Apps by Omer LeviDevSecCon Tel Aviv 2018 - Security Testing for  Containerised Apps by Omer Levi
DevSecCon Tel Aviv 2018 - Security Testing for Containerised Apps by Omer Levi
 
Groovy and noteworthy
Groovy and noteworthyGroovy and noteworthy
Groovy and noteworthy
 
Behaviour Driven Development Hands-on
Behaviour Driven Development Hands-onBehaviour Driven Development Hands-on
Behaviour Driven Development Hands-on
 
Dev secops
Dev secopsDev secops
Dev secops
 
Getting your project_started
Getting your project_startedGetting your project_started
Getting your project_started
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?
 
Test Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShellTest Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShell
 
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeployContinuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeploy
 
8 tips for mastering node.js
8 tips for mastering node.js8 tips for mastering node.js
8 tips for mastering node.js
 
“Practical DevOps by a small team of devs” by Ilgvars Jēcis from FinoTech  at...
“Practical DevOps by a small team of devs” by Ilgvars Jēcis from FinoTech  at...“Practical DevOps by a small team of devs” by Ilgvars Jēcis from FinoTech  at...
“Practical DevOps by a small team of devs” by Ilgvars Jēcis from FinoTech  at...
 

Viewers also liked

A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
Wen-Tien Chang
 

Viewers also liked (16)

Vagrant and docker
Vagrant and dockerVagrant and docker
Vagrant and docker
 
Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]
 
DevOps introduction with ansible, vagrant, and docker
DevOps introduction with ansible, vagrant, and dockerDevOps introduction with ansible, vagrant, and docker
DevOps introduction with ansible, vagrant, and docker
 
Hacking Virtual Appliances
Hacking Virtual AppliancesHacking Virtual Appliances
Hacking Virtual Appliances
 
"Up" with vagrant and docker
"Up" with vagrant and docker"Up" with vagrant and docker
"Up" with vagrant and docker
 
Vagrant + Ansible + Docker
Vagrant + Ansible + DockerVagrant + Ansible + Docker
Vagrant + Ansible + Docker
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & Ansible
 
Vagrant, Ansible and Docker - How they fit together for productive flexible d...
Vagrant, Ansible and Docker - How they fit together for productive flexible d...Vagrant, Ansible and Docker - How they fit together for productive flexible d...
Vagrant, Ansible and Docker - How they fit together for productive flexible d...
 
An Introduction to Vagrant and Docker
An Introduction to Vagrant and DockerAn Introduction to Vagrant and Docker
An Introduction to Vagrant and Docker
 
Vagrant
VagrantVagrant
Vagrant
 
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
 
Ansible docker
Ansible dockerAnsible docker
Ansible docker
 
It Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software DevelopmentIt Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software Development
 
Vagrant and docker
Vagrant and dockerVagrant and docker
Vagrant and docker
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similar to Vagrant and Docker

Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)
Akhmad Fathonih
 

Similar to Vagrant and Docker (20)

Тарас Кирилюк — Docker basics. How-to for Drupal developers
Тарас Кирилюк — Docker basics. How-to for Drupal developersТарас Кирилюк — Docker basics. How-to for Drupal developers
Тарас Кирилюк — Docker basics. How-to for Drupal developers
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker compose
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Docker on Power Systems
Docker on Power SystemsDocker on Power Systems
Docker on Power Systems
 
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
 
Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)
 
Docker up and Running For Web Developers
Docker up and Running For Web DevelopersDocker up and Running For Web Developers
Docker up and Running For Web Developers
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web Developers
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
 
Docker workshop GDSC_CSSC
Docker workshop GDSC_CSSCDocker workshop GDSC_CSSC
Docker workshop GDSC_CSSC
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
 
Run automated tests in Docker
Run automated tests in DockerRun automated tests in Docker
Run automated tests in Docker
 
Introducing docker
Introducing dockerIntroducing docker
Introducing docker
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
DevOps: Docker Workshop
DevOps: Docker WorkshopDevOps: Docker Workshop
DevOps: Docker Workshop
 

More from Nascenia IT

More from Nascenia IT (20)

AI Tools for Productivity: Exploring Prompt Engineering and Key Features
AI Tools for Productivity: Exploring Prompt Engineering and Key FeaturesAI Tools for Productivity: Exploring Prompt Engineering and Key Features
AI Tools for Productivity: Exploring Prompt Engineering and Key Features
 
Introduction to basic data analytics tools
Introduction to basic data analytics toolsIntroduction to basic data analytics tools
Introduction to basic data analytics tools
 
Communication workshop in nascenia
Communication workshop in nasceniaCommunication workshop in nascenia
Communication workshop in nascenia
 
The Art of Statistical Deception
The Art of Statistical DeceptionThe Art of Statistical Deception
The Art of Statistical Deception
 
করোনায় কী করি!
করোনায় কী করি!করোনায় কী করি!
করোনায় কী করি!
 
GDPR compliance expectations from the development team
GDPR compliance expectations from the development teamGDPR compliance expectations from the development team
GDPR compliance expectations from the development team
 
Writing Clean Code
Writing Clean CodeWriting Clean Code
Writing Clean Code
 
History & Introduction of Neural Network and use of it in Computer Vision
History & Introduction of Neural Network and use of it in Computer VisionHistory & Introduction of Neural Network and use of it in Computer Vision
History & Introduction of Neural Network and use of it in Computer Vision
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineRuby on Rails: Coding Guideline
Ruby on Rails: Coding Guideline
 
iphone 11 new features
iphone 11 new featuresiphone 11 new features
iphone 11 new features
 
Software quality assurance and cyber security
Software quality assurance and cyber securitySoftware quality assurance and cyber security
Software quality assurance and cyber security
 
Job Market Scenario For Freshers
Job Market Scenario For Freshers Job Market Scenario For Freshers
Job Market Scenario For Freshers
 
Modern Frontend Technologies (BEM, Retina)
Modern Frontend Technologies (BEM, Retina)Modern Frontend Technologies (BEM, Retina)
Modern Frontend Technologies (BEM, Retina)
 
CSS for Developers
CSS for DevelopersCSS for Developers
CSS for Developers
 
Big commerce app development
Big commerce app developmentBig commerce app development
Big commerce app development
 
Integrating QuickBooks Desktop with Rails Application
Integrating QuickBooks Desktop with Rails ApplicationIntegrating QuickBooks Desktop with Rails Application
Integrating QuickBooks Desktop with Rails Application
 
Shopify
ShopifyShopify
Shopify
 
TypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideTypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation Guide
 
Clean code
Clean codeClean code
Clean code
 
Ruby conf 2016 - Secrets of Testing Rails 5 Apps
Ruby conf 2016 - Secrets of Testing Rails 5 AppsRuby conf 2016 - Secrets of Testing Rails 5 Apps
Ruby conf 2016 - Secrets of Testing Rails 5 Apps
 

Recently uploaded

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
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
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
 
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...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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...
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
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
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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
 

Vagrant and Docker

Editor's Notes

  1. Samiul
  2. Samiul Vagrant is a tool for building complete development environments. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases development/production parity, and makes the "works on my machine" excuse a relic of the past.
  3. Samiul Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team. To achieve its magic, Vagrant stands on the shoulders of giants. Machines are provisioned on top of VirtualBox, VMware, AWS, or any other provider. Then, industry-standard provisioning tools such as shell scripts, Chef, or Puppet, can be used to automatically install and configure software on the machine.
  4. Samiul isolate dependencies and their configuration within a single disposable, consistent environment, without sacrificing any of the tools you're used to working with (editors, browsers, debuggers, etc.) creates a single Vagrantfile, you just need to vagrant up and everything is installed and configured for you to work.
  5. Samiul
  6. Feroj - Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.
  7. Feroj
  8. Go to the universal docker installation page, which is super easy for even non tech people :P Run ‘hello-world’ container, from docker hub