Skip to content

Instantly share code, notes, and snippets.

@hhcordero
Last active September 7, 2016 04:24
Show Gist options
  • Save hhcordero/33755fff51482a4937f1 to your computer and use it in GitHub Desktop.
Save hhcordero/33755fff51482a4937f1 to your computer and use it in GitHub Desktop.
Introduction to Docker by Hector Cordero
<section data-markdown>
# INTRO TO DOCKER
Hector Cordero
September 30, 2015
</section>
<section data-markdown>
## AGENDA
- What is Docker?
- Why use Docker?
- Common DD Apps
- Docker Workflow
Note:
1. What docker can do and what are docker features
2. Evaluate if docker can be use in DD use case. Advantages over VM
3. Apps currently used in DD and are available in Docker Hub
4. How docker works
</section>
<section>
<section data-markdown>
## WHAT IS DOCKER?
From Docker website:
> "Docker allows you to package an application with all of its dependencies into a standardized unit for software development."
Note:
1. Docker can wrap up code, runtime, system tools, system libraries - anything you can install!
2. App runs the same, regardless of the environment
</section>
<section data-markdown>
### IS DOCKER VM (Hypervisor)?
</section>
<section>
<h3>IT'S A CONTAINER!</h3>
<img class="stretch" src="https://s3-ap-southeast-1.amazonaws.com/thor-docker-poc/containers.jpg">
<aside class="notes">
Container uses same resource isolation and allocation benefits as VM's but different architectural approach.<br/>
</aside>
</section>
<section data-markdown>
### CONTAINERS ARE...
- Lightweight
- More portable and efficient
- Super fast to spin up
- Secure
Note:
1. Share the same operating system kernel
2. Less overhead than VM
3. Boot in seconds (VM around 2 to 5 mins)
4. Provides isolation from other application and avoid breaking of your host envrionment
</section>
<section>
<h3>CONTAINER VS VM</h3>
<img src="https://s3-ap-southeast-1.amazonaws.com/thor-docker-poc/docker.png">
<img src="https://s3-ap-southeast-1.amazonaws.com/thor-docker-poc/vm.png">
<aside class="notes">
Avoid Guest OS overhead, may be tens of GBs in size. Super fast spin up is big for development.
</aside>
</section>
</section>
<section>
<section data-markdown>
## WHY USE DOCKER?
Docker helps you ship code faster, test faster, deploy faster, and shorten the cycle between writing code and running code.
Note:
Vagrant vs Docker, XAMPP vs Docker - sure it works, but is it easy to share?
</section>
<section>
<h4>MATRIX OF HELL (term coined by Docker, Inc.)</h4>
<table class="reveal">
<tr>
<td>PHP</td>
<td>?</td>
<td>?</td>
<td>?</td>
<td>?</td>
</tr>
<tr>
<td>Apache</td>
<td>?</td>
<td>?</td>
<td>?</td>
<td>?</td>
</tr>
<tr>
<td>Varnish</td>
<td>?</td>
<td>?</td>
<td>?</td>
<td>?</td>
</tr>
<tr>
<td>Drupal</td>
<td>?</td>
<td>?</td>
<td>?</td>
<td>?</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>DEV</td>
<td>QA</td>
<td>UAT</td>
<td>PROD</td>
</tr>
</table>
<aside class="notes">
1. Cloning drawbacks (includes unnecessary files - test files, test utilities, test apps) vs Container based approach - only necessary files are included<br/>
2. Avoid vendor locked-in
</aside>
</section>
<section>
<h3>CONTAINERISE IT!</h3>
<img class="stretch" src="https://s3-ap-southeast-1.amazonaws.com/thor-docker-poc/container.jpg">
</section>
</section>
<section>
<section data-markdown>
## COMMON DD APPS
- Drupal
- WordPress
- PHP
- Apache
- Elasticsearch
- Logstash
- Kibana
- MySQL
- Memcached
- Java
And lot more, all these are official images in Docker Hub.
Note:
- 86 official images
- 150,000 repos mentioned in DockerCon 2015
- Most popular base image is Ubuntu (188mb) and Alpine (5mb)
</section>
<section>
<h4>CONTAINERISED ECOSYSTEM</h4>
<img class="stretch" src="https://s3-ap-southeast-1.amazonaws.com/thor-docker-poc/docker-containers.png">
</section>
<section>
<h4>COMPANIES THAT SUPPORT</h4>
<h4>CONTAINER TECHNOLOGY ARE GROWING</h4>
<img class="stretch" src="https://s3-ap-southeast-1.amazonaws.com/thor-docker-poc/containerscape.png">
</section>
</section>
<section>
<section data-markdown>
## DOCKER WORKFLOW
- Find image (Docker Hub/Self Hosted Registry)
- Build image
- Pull image
- Run container using the image
- Start/Stop/Restart container
- Remove container/image
- Import/Export image
</section>
<section>
<h4>WORKFLOW DIAGRAM</h4>
<img class="stretch" src="https://s3-ap-southeast-1.amazonaws.com/thor-docker-poc/docker-workflow.jpg">
</section>
<section>
<h4>WORKFLOW DIAGRAM (DETAILED)</h4>
<img class="stretch" src="https://s3-ap-southeast-1.amazonaws.com/thor-docker-poc/docker-workflow2.png">
</section>
<section data-markdown>
#### DEMO
</section>
</section>
<section data-markdown>
## RESOURCES & LINKS
- Images from Docker website, Cluster Up and Google search
- Docker - [www.docker.com/whatisdocker](https://www.docker.com/whatisdocker)
- Docker 101 Slides - [www.slideshare.net/Docker/docker-101-introduction-to-docker](https://www.slideshare.net/Docker/docker-101-introduction-to-docker)
- Reveal.js - [github.com/hakimel/reveal.js](https://github.com/hakimel/reveal.js)
</section>
<section data-markdown>
> "The more you step outside your comfort zone, the bigger your comfort zone gets." - Tweet by HTC
Let us all COLLABORATE!
GitHub: [github.com/hhcordero](https://github.com/hhcordero/)
Docker Hub: [hub.docker.com/u/hhcordero](https://hub.docker.com/u/hhcordero/)
Thank you!
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment