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
Docker 101
Search
Alexandre González
December 17, 2015
Technology
4
190
Docker 101
Slides of the talk given at jobandtalent.com
Alexandre González
December 17, 2015
Tweet
Share
More Decks by Alexandre González
See All by Alexandre González
Building an Enterprise-Ready Lambda Experience
agonzalezro
0
80
Fragmentación, el virus que puede acabar con tu alta disponibilidad (con ejemplos para kubernetes)
agonzalezro
0
410
From source code to Kubernetes, a Continuous Deployment tale
agonzalezro
0
96
From pets to cattle, the way of Kubernetes
agonzalezro
2
590
Python, Kubernetes & friends
agonzalezro
0
450
Kubernetes 101
agonzalezro
0
620
Custom Volume Plugins
agonzalezro
1
1.3k
Go 101 updated
agonzalezro
0
770
Kubernetes Volume Plugins: Flocker
agonzalezro
2
750
Other Decks in Technology
See All in Technology
コードの考古学 〜労務システムから発掘した成長の糧〜
kenta_smarthr
1
1.3k
“⾞が通れるほど⼤きな”セキュリティーホールを抑えながらログインしたい
taiseiue
0
160
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.6k
テストを実施する前に考えるべきテストの話 / Thinking About Testing Before You Test
nihonbuson
PRO
15
2.1k
カンファレンスのつくりかた / The Conference Code: What Makes It All Work
tomzoh
8
950
Flutterアプリを⾃然⾔語で操作する
yukisakai1225
0
170
GigaViewerにおけるMackerel APM導入の裏側
7474
0
460
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
GitHub Coding Agent 概要
kkamegawa
1
1.9k
Redmineの意外と知らない便利機能 (Redmine 6.0対応版)
vividtone
0
1.3k
從開發到架構設計的可觀測性實踐
philipz
0
140
Houtou.pm #1
papix
0
680
Featured
See All Featured
Producing Creativity
orderedlist
PRO
346
40k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
620
Site-Speed That Sticks
csswizardry
7
590
Bash Introduction
62gerente
614
210k
How to train your dragon (web standard)
notwaldorf
92
6k
Code Reviewing Like a Champion
maltzj
523
40k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
750
Balancing Empowerment & Direction
lara
1
91
Transcript
Docker 101
What is Docker?
Why is it different?
VM model vs Docker model
Pros
• Rapid app deployment • Portability • Version control •
Lightweight • Inmutable • ...
Cons
• New tooling needed • Addoption • Orchestration • <-
putYourOwn
Hands on!
docker-machine $ docker-machine create --driver virtualbox jt $ eval $(docker-machine
env jt)
docker run $ docker run -it ubuntu d9f46b212a12fba0091f0f...
docker images vs docker ps $ docker images REPOSITORY TAG
IMAGE ID CREATED VIRTUAL SIZE ubuntu latest d55e68e6cc9c 5 days ago 187.9 MB $ docker ps CONTAINER ID IMAGE COMMAND CREATED... 12fba0091f0f ubuntu "sleep 10s" 2 seconds ago... c8e8b387fba7 ubuntu "yes" 2 seconds ago...
docker logs $ docker run -d ubuntu find / db943d94d68011757ffad50a94727ec0fda1a70245f1b6c09f46...
$ docker logs db943d94d68011757ff1b6c09f46... | head -n4 / /.dockerinit /etc /etc/resolv.conf
registry
docker pull $ docker pull ubuntu Using default tag: latest
latest: Pulling from library/ubuntu 9377ad319b00: Pull complete a82f81f25750: Pull complete b207c06aba70: Pull complete d55e68e6cc9c: Pull complete library/ubuntu:latest: The image you are pulling has... Digest: sha256:a2b67b6107aa6b1a387e75eebafd7c...
docker push $ docker tag d55e68e6cc9c agonzalezro/jt $ docker push
agonzalezro/jt The push refers to a repository [docker.io/agonzalezro/jt] (len: 1) d55e68e6cc9c: Image successfully pushed b207c06aba70: Image successfully pushed a82f81f25750: Image successfully pushed 9377ad319b00: Image successfully pushed latest: digest: sha256:b385f1dfb6fcda517d1... size: 7739
extra cmds
$ docker stop $ docker pause $ docker unpause $
docker start $ docker rm $ docker rmi ... AKA RTM
Dockerfiles
Dockerfile FROM debian:stable RUN apt-get update && apt-get install -y
--force-yes apache2 EXPOSE 80 443 VOLUME ["/var/www", "/var/log/apache2", "/etc/apache2"] ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
What to do next? $ docker build -t agonzalezro/jt .
$ docker push agonzalezro/jt
Compose
docker-compose.yml db: image: postgres ports: - “5432” companies: links: -db
web_core: build: ../web_core command: bundle exec rails s -p 3000 -b ‘0.0.0.0’ ports: - ”3000:3000”
Hassle “free”
Thanks!