-
Notifications
You must be signed in to change notification settings - Fork 0
/
oss2018-vancouver-intro-to-docker.html
7139 lines (4384 loc) · 191 KB
/
oss2018-vancouver-intro-to-docker.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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>Learning to Ride the Whale: An Introduction to Containers </title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="workshop.css">
</head>
<body>
<!--
<div style="position: absolute; left: 20%; right: 20%; top: 30%;">
<h1 style="font-size: 3em;">Loading ...</h1>
The slides should show up here. If they don't, it might be
because you are accessing this file directly from your filesystem.
It needs to be served from a web server. You can try this:
<pre>
docker-compose up -d
open http://localhost:8888/workshop.html # on MacOS
xdg-open http://localhost:8888/workshop.html # on Linux
</pre>
Once the slides are loaded, this notice disappears when you
go full screen (e.g. by hitting "f").
</div>
-->
<textarea id="source">class: title, self-paced
Learning to Ride the Whale: An Introduction<br/>to Containers<br/>
.nav[*Self-paced version*]
.debug[
```
M slides/containers/Training_Environment.md
M slides/intro-selfpaced.yml
M slides/shared/title.md
?? slides/images/play-with-docker-logo.png
?? slides/intro-selfpaced.html
?? slides/oss2018-vancouver.html
?? slides/oss2018-vancouver.pdf
?? slides/oss2018-vancouver.yml
```
These slides have been built from commit: 018282f
[shared/title.md](https://github.com/estesp/container.training/tree/master/slides/shared/title.md)]
---
class: title, in-person
Learning to Ride the Whale: An Introduction<br/>to Containers<br/><br/></br>
.footnote[
**Be kind to the WiFi!**<br/>
*Don't stream videos or download big files during the workshop.*<br/>
*Thank you!*
**Slides: http://container.training/**
]
.debug[[shared/title.md](https://github.com/estesp/container.training/tree/master/slides/shared/title.md)]
---
## A brief introduction
- This was initially written to support in-person, instructor-led workshops and tutorials
- These materials are maintained by [Jérôme Petazzoni](https://twitter.com/jpetazzo) and [multiple contributors](https://github.com/jpetazzo/container.training/graphs/contributors)
- You can also follow along on your own, at your own pace
- We included as much information as possible in these slides
- We recommend having a mentor to help you ...
- ... Or be comfortable spending some time reading the Docker
[documentation](https://docs.docker.com/) ...
- ... And looking for answers in the [Docker forums](forums.docker.com),
[StackOverflow](http://stackoverflow.com/questions/tagged/docker),
and other outlets
.debug[[containers/intro.md](https://github.com/estesp/container.training/tree/master/slides/containers/intro.md)]
---
class: self-paced
## Hands on, you shall practice
- Nobody ever became a Jedi by spending their lives reading Wookiepedia
- Likewise, it will take more than merely *reading* these slides
to make you an expert
- These slides include *tons* of exercises and examples
- They assume that you have acccess to a machine running Docker
- If you are attending a workshop or tutorial:
<br/>you will be given specific instructions to access a cloud VM
- If you are doing this on your own:
<br/>we will tell you how to install Docker or access a Docker environment
.debug[[containers/intro.md](https://github.com/estesp/container.training/tree/master/slides/containers/intro.md)]
---
## About these slides
- All the content is available in a public GitHub repository:
https://github.com/jpetazzo/container.training
- You can get updated "builds" of the slides there:
http://container.training/
<!--
.exercise[
```open https://github.com/jpetazzo/container.training```
```open http://container.training/```
]
-->
--
- Typos? Mistakes? Questions? Feel free to hover over the bottom of the slide ...
.footnote[.emoji[👇] Try it! The source file will be shown and you can view it on GitHub and fork and edit it.]
<!--
.exercise[
```open https://github.com/jpetazzo/container.training/tree/master/slides/common/about-slides.md```
]
-->
.debug[[shared/about-slides.md](https://github.com/estesp/container.training/tree/master/slides/shared/about-slides.md)]
---
class: extra-details
## Extra details
- This slide has a little magnifying glass in the top left corner
- This magnifying glass indicates slides that provide extra details
- Feel free to skip them if:
- you are in a hurry
- you are new to this and want to avoid cognitive overload
- you want only the most essential information
- You can review these slides another time if you want, they'll be waiting for you ☺
.debug[[shared/about-slides.md](https://github.com/estesp/container.training/tree/master/slides/shared/about-slides.md)]
---
name: toc-chapter-1
## Chapter 1
- [Docker 30,000ft overview](#toc-docker-ft-overview)
- [History of containers ... and Docker](#toc-history-of-containers--and-docker)
- [Our training environment](#toc-our-training-environment)
- [Our first containers](#toc-our-first-containers)
- [Background containers](#toc-background-containers)
- [Restarting and attaching to containers](#toc-restarting-and-attaching-to-containers)
.debug[(auto-generated TOC)]
---
name: toc-chapter-2
## Chapter 2
- [Understanding Docker images](#toc-understanding-docker-images)
- [Building Docker images with a Dockerfile](#toc-building-docker-images-with-a-dockerfile)
- [`CMD` and `ENTRYPOINT`](#toc-cmd-and-entrypoint)
- [Copying files during the build](#toc-copying-files-during-the-build)
.debug[(auto-generated TOC)]
---
name: toc-chapter-3
## Chapter 3
- [Reducing image size](#toc-reducing-image-size)
- [Multi-stage builds](#toc-multi-stage-builds)
- [Publishing images to the Docker Hub](#toc-publishing-images-to-the-docker-hub)
.debug[(auto-generated TOC)]
---
name: toc-chapter-4
## Chapter 4
- [Naming and inspecting containers](#toc-naming-and-inspecting-containers)
- [Labels](#toc-labels)
- [Getting inside a container](#toc-getting-inside-a-container)
.debug[(auto-generated TOC)]
---
name: toc-chapter-5
## Chapter 5
- [Container networking basics](#toc-container-networking-basics)
- [Working with volumes](#toc-working-with-volumes)
- [Limiting resources](#toc-limiting-resources)
.debug[(auto-generated TOC)]
---
name: toc-chapter-6
## Chapter 6
- [Deep dive into container internals](#toc-deep-dive-into-container-internals)
- [Namespaces](#toc-namespaces)
- [Control groups](#toc-control-groups)
- [Security features](#toc-security-features)
- [Copy-on-write filesystems](#toc-copy-on-write-filesystems)
.debug[(auto-generated TOC)]
---
name: toc-chapter-7
## Chapter 7
- [Docker Engine and other container engines](#toc-docker-engine-and-other-container-engines)
- [The container ecosystem](#toc-the-container-ecosystem)
- [Links and resources](#toc-links-and-resources)
.debug[(auto-generated TOC)]
.debug[[shared/toc.md](https://github.com/estesp/container.training/tree/master/slides/shared/toc.md)]
---
class: pic
.interstitial[![Image separating from the next chapter](https://gallant-turing-d0d520.netlify.com/containers/Container-Ship-Freighter-Navigation-Elbe-Romance-1782991.jpg)]
---
name: toc-docker-ft-overview
class: title
Docker 30,000ft overview
.nav[
[Previous section](#toc-)
|
[Back to table of contents](#toc-chapter-1)
|
[Next section](#toc-history-of-containers--and-docker)
]
.debug[(automatically generated title slide)]
---
# Docker 30,000ft overview
In this lesson, we will learn about:
* Why containers (non-technical elevator pitch)
* Why containers (technical elevator pitch)
* How Docker helps us to build, ship, and run
* The history of containers
We won't actually run Docker or containers in this chapter (yet!).
Don't worry, we will get to that fast enough!
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
## Elevator pitch
### (for your manager, your boss...)
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
## OK... Why the buzz around containers?
* The software industry has changed
* Before:
* monolithic applications
* long development cycles
* single environment
* slowly scaling up
* Now:
* decoupled services
* fast, iterative improvements
* multiple environments
* quickly scaling out
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
## Deployment becomes very complex
* Many different stacks:
* languages
* frameworks
* databases
* Many different targets:
* individual development environments
* pre-production, QA, staging...
* production: on prem, cloud, hybrid
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: pic
## The deployment problem
![problem](images/shipping-software-problem.png)
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: pic
## The matrix from hell
![matrix](images/shipping-matrix-from-hell.png)
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: pic
## The parallel with the shipping industry
![history](images/shipping-industry-problem.png)
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: pic
## Intermodal shipping containers
![shipping](images/shipping-industry-solution.png)
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: pic
## A new shipping ecosystem
![shipeco](images/shipping-indsutry-results.png)
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: pic
## A shipping container system for applications
![shipapp](images/shipping-software-solution.png)
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: pic
## Eliminate the matrix from hell
![elimatrix](images/shipping-matrix-solved.png)
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
## Results
* [Dev-to-prod reduced from 9 months to 15 minutes (ING)](
https://www.docker.com/sites/default/files/CS_ING_01.25.2015_1.pdf)
* [Continuous integration job time reduced by more than 60% (BBC)](
https://www.docker.com/sites/default/files/CS_BBCNews_01.25.2015_1.pdf)
* [Deploy 100 times a day instead of once a week (GILT)](
https://www.docker.com/sites/default/files/CS_Gilt%20Groupe_03.18.2015_0.pdf)
* [70% infrastructure consolidation (MetLife)](
https://www.docker.com/customers/metlife-transforms-customer-experience-legacy-and-microservices-mashup)
* [60% infrastructure consolidation (Intesa Sanpaolo)](
https://blog.docker.com/2017/11/intesa-sanpaolo-builds-resilient-foundation-banking-docker-enterprise-edition/)
* [14x application density; 60% of legacy datacenter migrated in 4 months (GE Appliances)](
https://www.docker.com/customers/ge-uses-docker-enable-self-service-their-developers)
* etc.
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
## Elevator pitch
### (for your fellow devs and ops)
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
## Escape dependency hell
1. Write installation instructions into an `INSTALL.txt` file
2. Using this file, write an `install.sh` script that works *for you*
3. Turn this file into a `Dockerfile`, test it on your machine
4. If the Dockerfile builds on your machine, it will build *anywhere*
5. Rejoice as you escape dependency hell and "works on my machine"
Never again "worked in dev - ops problem now!"
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
## On-board developers and contributors rapidly
1. Write Dockerfiles for your application components
2. Use pre-made images from the Docker Hub (mysql, redis...)
3. Describe your stack with a Compose file
4. On-board somebody with two commands:
```bash
git clone ...
docker-compose up
```
With this, you can create development, integration, QA environments in minutes!
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## Implement reliable CI easily
1. Build test environment with a Dockerfile or Compose file
2. For each test run, stage up a new container or stack
3. Each run is now in a clean environment
4. No pollution from previous tests
Way faster and cheaper than creating VMs each time!
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## Use container images as build artefacts
1. Build your app from Dockerfiles
2. Store the resulting images in a registry
3. Keep them forever (or as long as necessary)
4. Test those images in QA, CI, integration...
5. Run the same images in production
6. Something goes wrong? Rollback to previous image
7. Investigating old regression? Old image has your back!
Images contain all the libraries, dependencies, etc. needed to run the app.
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## Decouple "plumbing" from application logic
1. Write your code to connect to named services ("db", "api"...)
2. Use Compose to start your stack
3. Docker will setup per-container DNS resolver for those names
4. You can now scale, add load balancers, replication ... without changing your code
Note: this is not covered in this intro level workshop!
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## What did Docker bring to the table?
### Docker before/after
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## Formats and APIs, before Docker
* No standardized exchange format.
<br/>(No, a rootfs tarball is *not* a format!)
* Containers are hard to use for developers.
<br/>(Where's the equivalent of `docker run debian`?)
* As a result, they are *hidden* from the end users.
* No re-usable components, APIs, tools.
<br/>(At best: VM abstractions, e.g. libvirt.)
Analogy:
* Shipping containers are not just steel boxes.
* They are steel boxes that are a standard size, with the same hooks and holes.
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## Formats and APIs, after Docker
* Standardize the container format, because containers were not portable.
* Make containers easy to use for developers.
* Emphasis on re-usable components, APIs, ecosystem of standard tools.
* Improvement over ad-hoc, in-house, specific tools.
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## Shipping, before Docker
* Ship packages: deb, rpm, gem, jar, homebrew...
* Dependency hell.
* "Works on my machine."
* Base deployment often done from scratch (debootstrap...) and unreliable.
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## Shipping, after Docker
* Ship container images with all their dependencies.
* Images are bigger, but they are broken down into layers.
* Only ship layers that have changed.
* Save disk, network, memory usage.
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## Example
Layers:
* CentOS
* JRE
* Tomcat
* Dependencies
* Application JAR
* Configuration
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## Devs vs Ops, before Docker
* Drop a tarball (or a commit hash) with instructions.
* Dev environment very different from production.
* Ops don't always have a dev environment themselves ...
* ... and when they do, it can differ from the devs'.
* Ops have to sort out differences and make it work ...
* ... or bounce it back to devs.
* Shipping code causes frictions and delays.
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: extra-details
## Devs vs Ops, after Docker
* Drop a container image or a Compose file.
* Ops can always run that container image.
* Ops can always run that Compose file.
* Ops still have to adapt to prod environment,
but at least they have a reference point.
* Ops have tools allowing to use the same image
in dev and prod.
* Devs can be empowered to make releases themselves
more easily.
.debug[[containers/Docker_Overview.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_Overview.md)]
---
class: pic
.interstitial[![Image separating from the next chapter](https://gallant-turing-d0d520.netlify.com/containers/ShippingContainerSFBay.jpg)]
---
name: toc-history-of-containers--and-docker
class: title
History of containers ... and Docker
.nav[
[Previous section](#toc-docker-ft-overview)
|
[Back to table of contents](#toc-chapter-1)
|
[Next section](#toc-our-training-environment)
]
.debug[(automatically generated title slide)]
---
# History of containers ... and Docker
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
## First experimentations
* [IBM VM/370 (1972)](https://en.wikipedia.org/wiki/VM_%28operating_system%29)
* [Linux VServers (2001)](http://www.solucorp.qc.ca/changes.hc?projet=vserver)
* [Solaris Containers (2004)](https://en.wikipedia.org/wiki/Solaris_Containers)
* [FreeBSD jails (1999-2000)](https://www.freebsd.org/cgi/man.cgi?query=jail&sektion=8&manpath=FreeBSD+4.0-RELEASE)
Containers have been around for a *very long time* indeed.
(See [this excellent blog post by Serge Hallyn](https://s3hh.wordpress.com/2018/03/22/history-of-containers/) for more historic details.)
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
class: pic
## The VPS age (until 2007-2008)
![lightcont](images/containers-as-lightweight-vms.png)
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
## Containers = cheaper than VMs
* Users: hosting providers.
* Highly specialized audience with strong ops culture.
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
class: pic
## The PAAS period (2008-2013)
![heroku 2007](images/heroku-first-homepage.png)
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
## Containers = easier than VMs
* I can't speak for Heroku, but containers were (one of) dotCloud's secret weapon
* dotCloud was operating a PaaS, using a custom container engine.
* This engine was based on OpenVZ (and later, LXC) and AUFS.
* It started (circa 2008) as a single Python script.
* By 2012, the engine had multiple (~10) Python components.
<br/>(and ~100 other micro-services!)
* End of 2012, dotCloud refactors this container engine.
* The codename for this project is "Docker."
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
## First public release of Docker
* March 2013, PyCon, Santa Clara:
<br/>"Docker" is shown to a public audience for the first time.
* It is released with an open source license.
* Very positive reactions and feedback!
* The dotCloud team progressively shifts to Docker development.
* The same year, dotCloud changes name to Docker.
* In 2014, the PaaS activity is sold.
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
## Docker early days (2013-2014)
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
## First users of Docker
* PAAS builders (Flynn, Dokku, Tsuru, Deis...)
* PAAS users (those big enough to justify building their own)
* CI platforms
* developers, developers, developers, developers
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
## Positive feedback loop
* In 2013, the technology under containers (cgroups, namespaces, copy-on-write storage...)
had many blind spots.
* The growing popularity of Docker and containers exposed many bugs.
* As a result, those bugs were fixed, resulting in better stability for containers.
* Any decent hosting/cloud provider can run containers today.
* Containers become a great tool to deploy/move workloads to/from on-prem/cloud.
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
## Maturity (2015-2016)
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
## Docker becomes an industry standard
* Docker reaches the symbolic 1.0 milestone.
* Existing systems like Mesos and Cloud Foundry add Docker support.
* Standardization around the OCI (Open Containers Initiative).
* Other container engines are developed.
* Creation of the CNCF (Cloud Native Computing Foundation).
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
## Docker becomes a platform
* The initial container engine is now known as "Docker Engine."
* Other tools are added:
* Docker Compose (formerly "Fig")
* Docker Machine
* Docker Swarm
* Kitematic
* Docker Cloud (formerly "Tutum")
* Docker Datacenter
* etc.
* Docker Inc. launches commercial offers.
.debug[[containers/Docker_History.md](https://github.com/estesp/container.training/tree/master/slides/containers/Docker_History.md)]
---
class: pic
.interstitial[![Image separating from the next chapter](https://gallant-turing-d0d520.netlify.com/containers/aerial-view-of-containers.jpg)]
---
name: toc-our-training-environment
class: title
Our training environment
.nav[
[Previous section](#toc-history-of-containers--and-docker)
|
[Back to table of contents](#toc-chapter-1)
|
[Next section](#toc-our-first-containers)
]
.debug[(automatically generated title slide)]
---
class: title
# Our training environment
![PWD](images/play-with-docker-logo.png)
.debug[[containers/Training_Environment.md](https://github.com/estesp/container.training/tree/master/slides/containers/Training_Environment.md)]
---
## Our training environment
- If you are attending at OSS Summit Vancouver:
- we are going to use Play With Docker (PWD) to simplify usage/installation issues
- if you already have Docker installed you can use a local installation
- If you are doing or re-doing this course on your own, you can:
- install Docker locally (Docker for Mac or Docker for Windows on non-Linux)
- install Docker on e.g. a cloud VM
- use http://www.play-with-docker.com/ to instantly get a training environment
.debug[[containers/Training_Environment.md](https://github.com/estesp/container.training/tree/master/slides/containers/Training_Environment.md)]
---
## What *is* Docker?
- "Installing Docker" really means "Installing the Docker Engine and CLI".
- The Docker Engine is a daemon (a service running in the background).
- This daemon manages containers, the same way that an hypervisor manages VMs.
- We interact with the Docker Engine by using the Docker CLI.
- The Docker CLI and the Docker Engine communicate through an API.
- There are many other programs, and many client libraries, to use that API.
.debug[[containers/Training_Environment.md](https://github.com/estesp/container.training/tree/master/slides/containers/Training_Environment.md)]
---
## Why don't we run Docker locally?
- We are going to download container images and distribution packages.
- This could put a bit of stress on the local WiFi and slow us down.
- Instead, we use a remote VM that has a good connectivity
- In some rare cases, installing Docker locally is challenging:
- no administrator/root access (computer managed by strict corp IT)
- 32-bit CPU or OS
- old OS version (e.g. CentOS 6, OSX pre-Yosemite, Windows 7)
- It's better to spend time learning containers than fiddling with the installer!
.debug[[containers/Training_Environment.md](https://github.com/estesp/container.training/tree/master/slides/containers/Training_Environment.md)]
---
## Checking your PWD Setup
Once logged in, make sure that you can run a basic Docker command:
.small[
```bash
$ docker version
Client:
Version: 18.03.0-ce
API version: 1.37
Go version: go1.9.4
Git commit: 0520e24
Built: Wed Mar 21 23:10:06 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.0-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.4
Git commit: 0520e24
Built: Wed Mar 21 23:08:35 2018
OS/Arch: linux/amd64
Experimental: false
```
]
If this doesn't work, raise your hand so that an instructor can assist you!
.debug[[containers/Training_Environment.md](https://github.com/estesp/container.training/tree/master/slides/containers/Training_Environment.md)]
---
class: pic
.interstitial[![Image separating from the next chapter](https://gallant-turing-d0d520.netlify.com/containers/blue-containers.jpg)]
---
name: toc-our-first-containers
class: title
Our first containers
.nav[
[Previous section](#toc-our-training-environment)
|
[Back to table of contents](#toc-chapter-1)
|
[Next section](#toc-background-containers)
]
.debug[(automatically generated title slide)]
---
class: title
# Our first containers
![Colorful plastic tubs](images/title-our-first-containers.jpg)
.debug[[containers/First_Containers.md](https://github.com/estesp/container.training/tree/master/slides/containers/First_Containers.md)]
---