-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
256 lines (249 loc) · 6.95 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Docker Notes</title>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/moon.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>
Docker notes
</h1>
<h3>
<a href="https://www.meetup.com/WebApp-Builders/" target="_blank">Webapp Builders</a>
</h3>
</section>
<section>
<h3>These are our notes from the monthly meetups going through <a href="https://www.dockerbook.com/" target="_blank">The Docker Book</a></h3>
</section>
<section>
<h2>Table of Contents</h2>
<ul>
<li>
<a href="#january-2017">January 2017</a>
</li>
</ul>
</section>
<section id="january-2017">
<h1>January 2017</h1>
</section>
<section>
<section>
<h2>Back up, what is a Linux Container?</h2>
<ul>
<li>
Virtualization method for running multiple isolated Linux systems on top of an existing OS kernel
<ul>
<li>
Host system might have Ubuntu/OSX/Windows/CoreOS
</li>
<li>
Subsystem inside might be RHEL, Fedora, etc.
</li>
</ul>
</li>
</ul>
</section>
</section>
<section>
<section>
<h2>What is Docker?</h2>
<ul>
<li>
Tool that can package an application and its dependencies in a virtual container that can run on any Linux server.
</li>
<li>
A way to model your containers and more easily manage them.
</li>
</ul>
</section>
<section>
<img src="assets/lxc.png">
</section>
</section>
<section>
<h2>Why not containers</h2>
<h5>
Note that these are primarily historical reasons
</h5>
<ul>
<li>
Less secure (though a given container is going to have a lot less to attack)
</li>
<li>
Complex (networking, clustering, etc)
</li>
</ul>
</section>
<section>
<h2>Why containers</h2>
<ul>
<li>
Lightweight
</li>
<li>
Fast to set up
</li>
<li>
Easy to update/change
</li>
</ul>
</section>
<section>
<section>
<h2>Components of Docker (and why Docker)</h2>
<ul>
<li>
Docker client and server (AKA Docker Engine)
</li>
<li>
Docker Images
</li>
<li>
Registries
</li>
<li>
Docker Containers
</li>
</ul>
</section>
<section>
<h2>Docker Engine</h2>
<ul>
<li>
Docker client(s) talk to the docker server (or daemon) to manage Docker images, containers, volumes, and swarms (clusters).
</li>
<li>
Docker CLI, docker compose, docker swarm are all examples of clients.
</li>
</ul>
</section>
<section>
<h2>Docker images</h2>
Containers are launched from images which are in a 'layered' format (every command you run inside a container (or write to a file) is a new layer).
These are portable, and easy to share/store/update.
</section>
<section>
<h2>Registries</h2>
Docker stores the images in registries. Docker Hub is what we'll be using (you can create your own but we'll get there eventually).
</section>
<section>
<h2>Containers</h2>
The main thing we associate with Docker. Via docker engine, you launch an images from a registry.
</section>
</section>
<section>
<h3>So what about "traditional" configuration management tools (like Ansible, Chef, etc)</h3>
<div>
The general consensus seems to be you should not use any of these tools to manage the container image. A given line of ansible, etc would be seen
as its own layer and this may not work well.
</div>
<div>
With that said, perhaps there is room for using these tools to manage your deployed containers? Unsure on this...
</div>
</section>
<section>
<h2>Install Docker</h2>
<a href="https://docs.docker.com/engine/installation/" target="_blank">Instructions</a> on how to install Docker.
</section>
<section>
<section>
<h2>CLI Commands</h2>
<ul>
<li>
Type <code>docker</code> to see full list of commands.
</li>
</ul>
</section>
<section>
<h2><code>docker info</code></h2>
Gives stats on many things including:
<ul>
<li>
number of containers (running paused, stopped)
</li>
<li>
number of images
</li>
</ul>
</section>
</section>
<section>
<section>
<h2><code>docker run</code></h2>
<ul>
<li>
Will start running a container.
</li>
<li>
ex. <code>docker run --name webapps_container -i -t ubuntu /bin/bash</code>
</li>
<li>
<ul>
<li>
-i is interactive flag. Means the container will be kept open for you to run commands.
</li>
<li>
-t is tty (or terminal) flag. Means container will provide interactive shell.
</li>
<li>
--name is to give your container a custom name (docker will generate name otherwise).
</li>
</ul>
</li>
</ul>
</section>
<section>
<h2><code>docker run</code> cont'd</h2>
<ul>
<li>
Container is full fledged ubuntu host. Can ask for hostname, ip address, install apt packages etc.
</li>
</ul>
</section>
</section>
<section>
<h2><code>docker ps -a</code></h2>
<ul>
<li>
Let you see a listing of running (and stopped) containers.
</li>
<li>
container_id|image|command|created|status|ports|names
</li>
</ul>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
history: true,
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
]
});
</script>
</body>
</html>