Upload
maurice-beijer
View
137
Download
1
Embed Size (px)
Citation preview
The busy developers guide to Docker
Maurice de Beijer @mauricedb
2
Who am I?
• Maurice de Beijer• The Problem Solver• Microsoft Azure MVP• Freelance developer/instructor• Twitter: @mauricedb and @React_Tutorial• Web:http://www.TheProblemSolver.nl• E-mail: [email protected]
3
Overview
• What are containers• Why use container technology?• What is Docker• Creating and running Docker images• Running an ASP.NET Core 1.0 App in a Docker
container• But we need more
4
What is a container?
5
Once upon a ship
6Loading cargo the old way
7
A container ship these days
8
Loading is a bit faster
9
Running virtual machines
Virtual Machines vs Containers
10
11
NamespacesCgroupsUnion file system
What is Docker?
12
Docker Hub
13
14
Why use Docker?
• Package an application with it’s dependencies• Dev environment behaves exactly like production• Less overhead means more deployments on a server• Deploy the same container in different clouds• Not just for cloud computing• Docker has standardized container formats• It’s open source
15
Some other Docker Use Cases
• Simulate deployed environment during development– Each container simulates a machine
• Share containers between developers– Database containers with sample data• Also use in the (automated) QA environment
– Build containers with compilers and libraries• Also use in the CI environment
16
Build
ing
cont
aine
rs
17
Useful docker image commands
• docker images• docker pull <image name>• docker build –t <image name> <folder>• docker run <image name>• docker rmi <image id>• docker rmi $(docker images -q -f dangling=true)
18
Useful docker container commands
• Docker ps• docker logs <container name>• docker stop <container name>• docker start <container name>• docker kill <container id>• docker rm <container id>• docker rm $(docker ps -a -q)
19
20
Orchestration
21
Dock
er C
ompo
se
22
23
The
min
imal
Doc
kerfi
le
24
ASP.
NET
Cor
e 1.
0 Ap
pon
Lin
ux
25
Dock
er o
n W
indo
ws
26
27
Containers can be great…
28
29…with the right tools!
30
31
32
33
34
35
36
37
38Maurice de Beijer - @mauricedb