Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to Docker
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Michael Sauter
March 13, 2014
Technology
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to Docker
A short introduction to Docker at the Web Dev Melbourne meetup
Michael Sauter
March 13, 2014
More Decks by Michael Sauter
See All by Michael Sauter
Don't Aim for Reusability
michaelsauter
2
500
Ruby Development Environment with Docker
michaelsauter
0
70
Other Decks in Technology
See All in Technology
Bucharest Tech Week 2026 - Reinventing testing practices in the AI era
edeandrea
PRO
1
130
失敗を経て、Harness Engineering で 大切にしたいことを考える / Learning from Failure: What Matters in Harness Engineering
bitkey
PRO
0
230
製造業のクラウド活用最適解〜AI,DXを加速するデータ基盤の作り方〜
hamadakoji
0
430
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
320
SIer20年! 培ったスキルがスタートアップで輝く時
shucho0103
0
810
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.9k
あなたの AI ワークスペースに、 専門コーダーを連れてくる - Amazon Quick Desktop 最新情報
kawaji_scratch
1
130
チームで実践する AI-DLC 思考の軌跡を残すチェックポイント設計
belongadmin
0
3.2k
AWSシリコン最前線 〜AI時代のチップ選択を読み解く〜
htokoyo
2
350
DevOps Agentで始めるAWS運用 〜フロンティアエージェントが変える運用の現場〜
nyankotaro
1
360
AIの性能が向上しても未解決な組織の重大問題は何か?/An Unsolved Organizational Problem in the Age of AI
moriyuya
3
570
社内 AI エージェント Synapse と セマンティックレイヤーの育て方
hiroakis
1
1.5k
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
160
Technical Leadership for Architectural Decision Making
baasie
3
400
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
200
Design in an AI World
tapps
1
230
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
430
How to Talk to Developers About Accessibility
jct
2
230
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Making Projects Easy
brettharned
120
6.7k
The Invisible Side of Design
smashingmag
302
52k
Transcript
Introduction to Docker by @michaelsauter
How do you develop for the web? Directly on your
OS? Inside a VM? There is another way ... Docker!
What is Docker? Based on Linux containers virtualization method for
running isolated Linux systems on a host Open-source tool to make it easy and accessible
It's like a ... Lightweight VM Isolated process just like
a VM, only smaller and faster run one process inside a container
What forms a Docker container?
Why Docker? Build once ... run anywhere isolated from host
(e.g. build locally, run remotely) Isolation between containers avoid dependency hell Automation & Abstraction build, start, stop, attach, remove etc. Reusable services (via Docker Index) MySQL, PostgreSQL, Redis, ... images playgrounds for frameworks?
Alright, alright, here's the demo ... ... a Sinatra blog!
Ruby Based on d11wtq/ruby , running bundle exec rackup Linked to ... PostgreSQL Using orchardup/postgresql , running postgres
PostgreSQL container # Create and start container docker run \
--env POSTGRESQL_DB=sinatra --env POSTGRESQL_USER=sinatra --env POSTGRESQL_PASS=sinatra \ --publish 5432:5432 \ --detach --name sinatra_db orchardup/postgresql
Sinatra container # Dockerfile (describes build steps) FROM d11wtq/ruby RUN
sudo apt-get install -y -q libpq-dev WORKDIR /data CMD bundle install --path vendor && bundle exec rake db:migrate && bundle exec rackup # Build image docker build -t michaelsauter/sinatra-example . # Create and start container docker run \ --env POSTGRESQL_DB=sinatra --env POSTGRESQL_USER=sinatra --env POSTGRESQL_PASS=sinatra \ --link sinatra_db:db \ --publish 9292:9292 \ --volume /Code/web-dev-meetup/app:/data \ --detach --name sinatra_app michaelsauter/sinatra-example # In app.rb db = URI.parse(ENV["DB_PORT"]) # Set by Docker, e.g. tcp://172.17.0.2:5432 ActiveRecord::Base.establish_connection( adapter: "postgresql", host: db.host, port: db.port, username: ENV["POSTGRESQL_USER"], password: ENV["POSTGRESQL_PASS"], database: ENV["POSTGRESQL_DB"], encoding: "utf8" )
Demo, for real Ok, I'll cheat: I have already downloaded
/ built the images, and I'm using a small tool, , which will save me the typing. Crane
Thank you! Questions? Sinatra environment available at github.com/michaelsauter/sinatra-crane-env BTW, this
presentation runs in Docker, too :) It's using a container running NodeJS to provide Markdown + speaker notes support for reveal.js