<style>
.reveal section img{
border: 0; box-shadow: none;
}
.reveal section img{
border: 0; box-shadow: none;
}
p.block{
width:450px;
font-size:23px;
text-align:left;
}
</style>
## Docker
> [name=Stephan Kiener, Michael Heinemann, Waldemar Schmidt]
---
<div style="display:flex; justify-content:center;">
<div style="width:450px;">
<img style="width:300px;" src="https://www.docker.com/wp-content/uploads/2022/03/vertical-logo-monochromatic.png">
</div>
<div style="height:400px;width:2px;background-color:black;margin:0 20px;">
</div>
<div>
<h2 style="text-align:left;">Docker</h2>
<p class="block">
Docker ist eine freie Software, die es durch <strong>Container</strong> ermöglicht, dass Software zuverlässig in jeder Umgebung läuft.
</p>
</div>
</div>
---
<!--
### Die Idee von Scrum

[http://pm-powerconsulting.com/blog/chow-124-scrum-master-can-increase-sprint-duration/](http://pm-powerconsulting.com/blog/chow-124-scrum-master-can-increase-sprint-duration/) -->
---
### Container?

----
### Warum Container?

----
### Problem
<img alt="puppy-linux-cobol" src="https://i.imgur.com/8Iuozz0.png" width="700">
Wie bekommen wir die Umgebung, die unsere Software braucht auf jeder Maschine?
----
### Virtuelle Maschine
Eine mögliche Lösung wären VMs.
<img alt="VMs" src="https://i.imgur.com/iCR4UvB.png" width="700">
----
### Virtuelle Maschine
<iframe src="https://giphy.com/embed/fjxMEdpMT9qDyBVLL4" width="458" height="480" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
<iframe src="https://giphy.com/embed/fjxMEdpMT9qDyBVLL4" width="458" height="480" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
----
### Container
<img alt="Container" src="https://i.imgur.com/SjupxuD.png" width="700">
----
### Container
<iframe src="https://www.icegif.com/wp-content/uploads/cheetah-running-icegif-9.gif" width="458" height="480" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
----
<div style="display:flex; justify-content:center;">
<div>
<h2 style="text-align:right;">
VM
</h2>
<p class="block" style="text-align:right">
<img alt="VMs" src="https://i.imgur.com/iCR4UvB.png" width="500">
</div>
<div style="height:500px;width:2px;background-color:black;margin:0 20px;">
</div>
<div>
<h2 style="text-align:left;">DOCKER</h2>
<p class="block">
<img alt="Container" src="https://i.imgur.com/SjupxuD.png" width="500">
</p>
</div>
</div>
---
### Fundament
Docker-File | Image | Container
----
<div style="display:flex; justify-content:center;">
<div style="width:450px;">
<iframe src="https://giphy.com/embed/N5Adsn0dgz6h2" width="369" height="480" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
</div>
<div style="height:400px;width:2px;background-color:black;margin:0 20px;">
</div>
<div>
<h3 style="text-align:left;">Docker-File</h3>
<p class="block">
Das Docker-File ist die DNA der Software. <br>
Das Docker-File ist der Code, der Docker sagt, wie es ein Image bauen soll.
</p>
</div>
</div>
----
<div style="display:flex; justify-content:center;">
<div style="width:450px;">
<iframe src="https://giphy.com/embed/3owypf6HrM3J7UTvAA" width="480" height="480" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
</div>
<div style="height:400px;width:2px;background-color:black;margin:0 20px;">
</div>
<div>
<h3 style="text-align:left;">Docker-Image</h3>
<p class="block">
Das Docker-Image ist wie ein Snapshot der Software mit allen ihren Abhängigkeiten bis zum OS-Level. <br><br>
<b>Das Image ist nicht veränderbar.</b>
</p>
</div>
</div>
----
<div style="display:flex; justify-content:center;">
<div style="width:450px;">
<iframe src="https://giphy.com/embed/QHYrdOTUvMhRJstciv" width="480" height="390" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
</div>
<div style="height:400px;width:2px;background-color:black;margin:0 20px;">
</div>
<div>
<h3 style="text-align:left;">Docker-Container</h3>
<p class="block">
Ein Docker-Image kann dazu genutzt werden, <b>mehrere</b> Container auszurollen. Die Container enthalten die "richtige" Software. <br>
Container nutzen ein isoliertes Filesystem
</p>
</div>
</div>
----
## Zusammenfassung
Ein Container nutzt ein isoliertes File-System, was vom Image bereitgestellt wird. Es muss alles enthalten, um eine Anwendung laufen zu lassen.
- Alle Abhängigkeiten,
- Konfigurationen,
- Skripte,
- Binaries,
- Umgebungsvariablen,
- Default Kommando und
- andere Metadaten
---
### Beispiel
----
#### Dockerfile
```dockerfile=
FROM ubuntu:20.04
RUN apt-get install sl
ENV PORT=8080
CMD ["echo", "Docker is easy"]
```
Note:
1. Das ubuntu image wird aus der Cloud geladen. Eigene Images können einfach hochgeladen werden.
2. Installiert Dependencies.
3. Envirenment Variablem können gesetzt werden.
4. Am Ende kann ein Default Command gesetzt werden, was ausgeführt wird, wenn ein Container gestartet wird
----
#### Docker Image
```shell
docker build -t myapp ./
# Mit docker build wird nun
# Schicht für Schicht
# nach der "Anleitung" im Docker-File gebaut.
```
----
#### Docker Container
<iframe src="https://giphy.com/embed/JsnbYw3mMgObe" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
```shell
docker run myapp
# Mit docker run
# kann ein Container gestartet werden.
```
---
### Ausblick
<img alt="Ausblick Docker" src="https://i.imgur.com/guaWcCO.png" width="700">
---
<!-- .slide: data-background="https://hackmd.io/_uploads/HkmInTvBj.jpg" -->
[Zum nachlesen](https://content.fme.de/blog/docker-ist-tot-podman-eine-alternative)
----
### Podman ersetzt Docker?
<img src="https://hackmd.io/_uploads/BkwqnTwHj.png" alt="Docker vs Podman">
{"metaMigratedAt":"2023-06-17T10:54:08.944Z","metaMigratedFrom":"YAML","title":"Einstieg Docker","breaks":false,"slideOptions":"{\"theme\":\"white\"}","contributors":"[{\"id\":\"2906fc5e-2561-4f47-8469-4bba9ad6f26a\",\"add\":586,\"del\":198},{\"id\":\"9f489dc8-8ce5-439c-86fd-e78755aec784\",\"add\":13908,\"del\":8204}]","description":"[name=Stephan Kiener, Michael Heinemann, Waldemar Schmidt]"}