SlideShare a Scribd company logo
Docker
Build, Ship and Run
GDG Spaghetti Code Liberec, 6.10.2015 1
Ladislav Prskavec
4 Twitter: @abtris
4 Blog: http://blog.prskavec.net
4 Site Reliability Engineer (SRE)
in Apiary.io
GDG Spaghetti Code Liberec, 6.10.2015 2
GDG Spaghetti Code Liberec, 6.10.2015 3
What's Docker?
GDG Spaghetti Code Liberec, 6.10.2015 4
Analogy
from
logistics
GDG Spaghetti Code Liberec, 6.10.2015 5
Goods, wares
GDG Spaghetti Code Liberec, 6.10.2015 6
Containers
GDG Spaghetti Code Liberec, 6.10.2015 7
Why Docker?
GDG Spaghetti Code Liberec, 6.10.2015 8
Fast
and
scalableGDG Spaghetti Code Liberec, 6.10.2015 9
Build once,
run anywhere
GDG Spaghetti Code Liberec, 6.10.2015 10
Configure once, run
anywhere
GDG Spaghetti Code Liberec, 6.10.2015 11
Example of using Docker
4 build documentation in Sphinx with latex
support
4 executing code in many different
programming languages without requiring
a single compiler or script interpreter on
your machine - docker exec
4 running gui app in docker at linux
GDG Spaghetti Code Liberec, 6.10.2015 12
Example of using Docker
4 development without install ing many
tools at local machine
4 Vagrant, Otto dev
4 continues integration using docker
4 Jenkins, TravisCI, CircleCI
4 DevOps platform for build, deploy and
manage apps across any cloud - Tutum
GDG Spaghetti Code Liberec, 6.10.2015 13
Docker Engine
GDG Spaghetti Code Liberec, 6.10.2015 14
Docker Engine
GDG Spaghetti Code Liberec, 6.10.2015 15
VM vs Docker
GDG Spaghetti Code Liberec, 6.10.2015 16
Containers and images
docker run hello-world
GDG Spaghetti Code Liberec, 6.10.2015 17
Docker Remote API
4 client & server in Docker
4 docker ps
4 docker build
4 docker push/pull
4 docker run/stop
4 docker inspect
GDG Spaghetti Code Liberec, 6.10.2015 18
Docker lifecycle
4 a build produces an immutable image
4 a container is as instance of the image
GDG Spaghetti Code Liberec, 6.10.2015 19
Docker lifecycle
GDG Spaghetti Code Liberec, 6.10.2015 20
Container lifecycle
GDG Spaghetti Code Liberec, 6.10.2015 21
Dockerfile
# Firefox over VNC
#
# VERSION 0.3
FROM ubuntu
# Install vnc, xvfb in order to create a 'fake' display and firefox
RUN apt-get update && apt-get install -y x11vnc xvfb firefox
RUN mkdir ~/.vnc
# Setup a password
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
# Autostart firefox (might not be the best way, but it does the trick)
RUN bash -c 'echo "firefox" >> /.bashrc'
EXPOSE 5900
CMD ["x11vnc", "-forever", "-usepw", "-create"]
GDG Spaghetti Code Liberec, 6.10.2015 22
DockerHub
GDG Spaghetti Code Liberec, 6.10.2015 23
GDG Spaghetti Code Liberec, 6.10.2015 24
Docker tools
GDG Spaghetti Code Liberec, 6.10.2015 25
Docker compose
4 defining and running
multi-container
applications with
Docker
GDG Spaghetti Code Liberec, 6.10.2015 26
docker-compose.yml
web:
build: .
ports:
- "5000:5000"
volumes:
- .:/code
links:
- redis
redis:
image: redis
GDG Spaghetti Code Liberec, 6.10.2015 27
Docker machine
4 Machine lets you create Docker hosts on
your computer, on cloud providers, and
inside your own data center.
4 part of Docker toolbox
4 replacement for boot2docker
GDG Spaghetti Code Liberec, 6.10.2015 28
Demo
GDG Spaghetti Code Liberec, 6.10.2015 29
Docker swarm
4 Docker Swarm is native
clustering for Docker.
GDG Spaghetti Code Liberec, 6.10.2015 30
Kinematic
4 desktop GUI for Docker
4 Mac and Windows only
GDG Spaghetti Code Liberec, 6.10.2015 31
Docker Trusted Registry (DTR)
4 private dedicated image registry
GDG Spaghetti Code Liberec, 6.10.2015 32
Yours private registry
4 storage at S3
docker run 
-d 
-p 5000:5000 
--restart=always 
--name registry 
registry:2
GDG Spaghetti Code Liberec, 6.10.2015 33
Open Container
ekosystem 1
1
https://www.mindmeister.com/389671722/open-container-ecosystem-
formerly-docker-ecosystem
GDG Spaghetti Code Liberec, 6.10.2015 34
GDG Spaghetti Code Liberec, 6.10.2015 35
Docker at Heroku
heroku plugins:install heroku-docker
4 https://gist.github.com/abtris/
6aca9b2668b8b5af0208
4 app.json must contain:
{ image: heroku/nodejs }
4 app.json specification
GDG Spaghetti Code Liberec, 6.10.2015 36
Dockerfile - heroku/nodejs
# Inherit from Heroku's stack
FROM heroku/cedar:14
# Internally, we arbitrarily use port 3000
ENV PORT 3000
# Which version of node?
ENV NODE_ENGINE 0.12.2
# Locate our binaries
ENV PATH /app/heroku/node/bin/:/app/user/node_modules/.bin:$PATH
# Create some needed directories
RUN mkdir -p /app/heroku/node /app/.profile.d
WORKDIR /app/user
# Install node
RUN curl -s https://s3pository.heroku.com/node/v$NODE_ENGINE/node-v$NODE_ENGINE-linux-x64.tar.gz | 
tar --strip-components=1 -xz -C /app/heroku/node
# Export the node path in .profile.d
RUN echo "export PATH="/app/heroku/node/bin:/app/user/node_modules/.bin:$PATH"" > 
/app/.profile.d/nodejs.sh
ONBUILD ADD package.json /app/user/
ONBUILD RUN /app/heroku/node/bin/npm install
ONBUILD ADD . /app/user/
GDG Spaghetti Code Liberec, 6.10.2015 37
Create Dockerfile
heroku docker:init
$ cat Dockerfile
FROM heroku/nodejs
GDG Spaghetti Code Liberec, 6.10.2015 38
Docker compose
web:
build: .
command: 'bash -c ''node index.js'''
working_dir: /app/user
environment:
PORT: 8080
ports:
- '8080:8080'
shell:
build: .
command: bash
working_dir: /app/user
environment:
PORT: 8080
ports:
- '8080:8080'
volumes:
- '.:/app/user'
GDG Spaghetti Code Liberec, 6.10.2015 39
Start development environment
$ docker-compose up web
Building web...
...
$ curl "http://$(docker-machine ip dev):8080"
GDG Spaghetti Code Liberec, 6.10.2015 40
Rebuild containers
Changes to your app and config.
docker-compose build
GDG Spaghetti Code Liberec, 6.10.2015 41
Heroku Release
$ heroku create
...
$ heroku docker:release
...
$ heroku open
GDG Spaghetti Code Liberec, 6.10.2015 42
Demo
GDG Spaghetti Code Liberec, 6.10.2015 43
AWS Release
$ docker build -t abtris/docker-liberec-example-app
...
$ docker push abtris/docker-liberec-example-app
...
$ docker pull abtris/docker-liberec-example-app
...
GDG Spaghetti Code Liberec, 6.10.2015 44
Run on AWS
$ docker run 
-d 
-p 3000:3000 
abtris/docker-liberec-example-app 
node index.js
$ curl http://localhost:3000
GDG Spaghetti Code Liberec, 6.10.2015 45
Demo
GDG Spaghetti Code Liberec, 6.10.2015 46
Docker & AWS
4 Elastic Beanstalk
4 EC2 Container Service (ECS)
4 EC2 with Swarm, Mesos or Kubernetes
GDG Spaghetti Code Liberec, 6.10.2015 47
Questions?
GDG Spaghetti Code Liberec, 6.10.2015 48
Credits
4 boat-containers.jpg 2
4 computer-scrap.jpg [^3]
4 vm-vs-docker.png [^4]
4 docker logos [^5]
4 formule_one.jpg [^6]
2
https://www.flickr.com/photos/41864721@N00/3451530961/
[^3]: https://www.flickr.com/photos/7362086@N02/2019666131/
[^4]: http://www.jayway.com/wp-content/uploads/2015/03/vm-vs-docker.png
[^5]: https://www.docker.com/brand-guidelines
GDG Spaghetti Code Liberec, 6.10.2015 49

More Related Content

PDF
Docker - modern platform for developement and operations
PDF
Intro 2 docker
PDF
Docker 導入:障礙與對策
PDF
Drone CI
PPTX
drone continuous Integration
PDF
Improve your Java Environment with Docker
PDF
Drone Continuous Integration
PDF
Import golang; struct microservice - Codemotion Rome 2015
Docker - modern platform for developement and operations
Intro 2 docker
Docker 導入:障礙與對策
Drone CI
drone continuous Integration
Improve your Java Environment with Docker
Drone Continuous Integration
Import golang; struct microservice - Codemotion Rome 2015

What's hot (20)

PPTX
Gorush: A push notification server written in Go
PDF
GCE 上搭配 Cloud Storage 建置 Drone CI
PDF
Drone CI - Container native continuous Integration / Delivery
PDF
Microservices in Golang
PDF
Automate App Container Delivery with CI/CD and DevOps
PDF
PuppetConf 2016: Docker, Mesos, Kubernetes and...Puppet? Don't Panic! – Deep...
PDF
はじめての JFrog Artifactory
PDF
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
PDF
Continuous Deployment with Kubernetes, Docker and GitLab CI
PDF
Joomla Continuous Delivery with Docker
PDF
Drone 1.0 Feature
PDF
Using docker to develop NAS applications
PDF
Workshop - Golang language
PDF
WebRTC - Brings Real-Time to the Web
PDF
Introduction to GitHub Actions
ODP
DevAssistant, Docker and You
PDF
Locally it worked! virtualizing docker
PDF
Import golang; struct microservice
PDF
Golang workshop
PDF
Docker 進階實務班
Gorush: A push notification server written in Go
GCE 上搭配 Cloud Storage 建置 Drone CI
Drone CI - Container native continuous Integration / Delivery
Microservices in Golang
Automate App Container Delivery with CI/CD and DevOps
PuppetConf 2016: Docker, Mesos, Kubernetes and...Puppet? Don't Panic! – Deep...
はじめての JFrog Artifactory
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
Continuous Deployment with Kubernetes, Docker and GitLab CI
Joomla Continuous Delivery with Docker
Drone 1.0 Feature
Using docker to develop NAS applications
Workshop - Golang language
WebRTC - Brings Real-Time to the Web
Introduction to GitHub Actions
DevAssistant, Docker and You
Locally it worked! virtualizing docker
Import golang; struct microservice
Golang workshop
Docker 進階實務班
Ad

Viewers also liked (20)

PDF
Agile Product Management
PDF
“Writing code that lasts” … or writing code you won’t hate tomorrow.
PDF
distributed: of systems and teams
PDF
Migration from Swing to JavaFX
PDF
Threat Modeling for the Internet of Things
PDF
Five Tips To Help You Tackle Programming
PDF
Startup Technology: Cheatsheet for Non-Techies
PDF
Bridging the Gap Between Data Science & Engineer: Building High-Performance T...
PDF
Visualising Data with Code
PDF
Testing at Spotify
PDF
Build Features, Not Apps
PDF
Angular Performance: Then, Now and the Future. Todd Motto
PPTX
CI/CD Pipeline with Docker
PDF
Weekly lecture appsterdam_19mar2014
PPTX
Docker Presentation
PDF
Docker Build
PPTX
Docker Fudamentals
PDF
Functional Programming Patterns for the Pragmatic Programmer
PDF
Fun with containers: Use Ansible to build Docker images
PDF
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Agile Product Management
“Writing code that lasts” … or writing code you won’t hate tomorrow.
distributed: of systems and teams
Migration from Swing to JavaFX
Threat Modeling for the Internet of Things
Five Tips To Help You Tackle Programming
Startup Technology: Cheatsheet for Non-Techies
Bridging the Gap Between Data Science & Engineer: Building High-Performance T...
Visualising Data with Code
Testing at Spotify
Build Features, Not Apps
Angular Performance: Then, Now and the Future. Todd Motto
CI/CD Pipeline with Docker
Weekly lecture appsterdam_19mar2014
Docker Presentation
Docker Build
Docker Fudamentals
Functional Programming Patterns for the Pragmatic Programmer
Fun with containers: Use Ansible to build Docker images
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Ad

Similar to GDGSCL - Docker a jeho provoz v Heroku a AWS (20)

PDF
Docker From Scratch
PDF
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
PPTX
Setup docker on existing application
PDF
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
PDF
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
PPTX
Getting Started with Docker
PPTX
Real World Experience of Running Docker in Development and Production
PPTX
Powercoders · Docker · Fall 2021.pptx
PDF
Agile Brown Bag - Vagrant & Docker: Introduction
PDF
Apt get no more let Vagrant, Puppet and Docker take the stage
PPTX
Tribal Nova Docker workshop
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
PDF
Docker - From Walking To Running
PDF
Real-World Docker: 10 Things We've Learned
PDF
PDF
Docker module 1
PDF
Up and running with docker
PDF
Containerizing a Web Application with Vue.js and Java
PDF
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Docker From Scratch
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Setup docker on existing application
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
Getting Started with Docker
Real World Experience of Running Docker in Development and Production
Powercoders · Docker · Fall 2021.pptx
Agile Brown Bag - Vagrant & Docker: Introduction
Apt get no more let Vagrant, Puppet and Docker take the stage
Tribal Nova Docker workshop
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker - From Walking To Running
Real-World Docker: 10 Things We've Learned
Docker module 1
Up and running with docker
Containerizing a Web Application with Vue.js and Java
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration

More from Ladislav Prskavec (20)

PDF
SRE in Apiary
PDF
Modern Web Architecture<br>based on JS, API and Markup
PDF
How you can kill Wordpress!
PDF
SRE in Startup
PDF
PDF
Datascript: Serverless Architetecture
PDF
Serverless Architecture
PDF
PDF
PragueJS meetups 30th anniversary
PDF
How to easy deploy app into any cloud
PDF
AWS Elastic Container Service
PDF
Comparison nodejs frameworks using Polls API
PDF
Docker Elastic Beanstalk
PDF
Docker včera, dnes a zítra
PDF
Tessel is a microcontroller that runs JavaScript.
PDF
PDF
PDF
PDF
Firebase and AngularJS
PDF
AngularJS at PyVo
SRE in Apiary
Modern Web Architecture<br>based on JS, API and Markup
How you can kill Wordpress!
SRE in Startup
Datascript: Serverless Architetecture
Serverless Architecture
PragueJS meetups 30th anniversary
How to easy deploy app into any cloud
AWS Elastic Container Service
Comparison nodejs frameworks using Polls API
Docker Elastic Beanstalk
Docker včera, dnes a zítra
Tessel is a microcontroller that runs JavaScript.
Firebase and AngularJS
AngularJS at PyVo

Recently uploaded (20)

PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
L1 - Introduction to python Backend.pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Transform Your Business with a Software ERP System
PPTX
ai tools demonstartion for schools and inter college
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Design an Analysis of Algorithms I-SECS-1021-03
How to Choose the Right IT Partner for Your Business in Malaysia
L1 - Introduction to python Backend.pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
Odoo Companies in India – Driving Business Transformation.pdf
PTS Company Brochure 2025 (1).pdf.......
Which alternative to Crystal Reports is best for small or large businesses.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Wondershare Filmora 15 Crack With Activation Key [2025
Transform Your Business with a Software ERP System
ai tools demonstartion for schools and inter college
CHAPTER 2 - PM Management and IT Context
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
ISO 45001 Occupational Health and Safety Management System
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool

GDGSCL - Docker a jeho provoz v Heroku a AWS