-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
129 lines (111 loc) · 2.97 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
<!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 from Scratch</title>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="css/zenburn.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section>Docker From Scratch</section>
<section>
<section>
Vores første Docker kommando
<pre><code data-trim data-noescape class="fragment">
docker run docker/whalesay cowsay "Hello World"
</code></pre>
</section>
<section>
<p>Lidt mere relevant hello world</p>
<pre class="fragment"><code data-trim data-noescape>
docker run python python -c "print('hello world')"
</code></pre>
</section>
</section>
<section>
<section>Lidt sjovere</section>
<section>
<p>Kør en postgres server!</p>
<pre class="fragment"><code data-trim data-noescape>
docker run -d -p 3000:5432 postgres
</code></pre>
<pre class="fragment"><code data-trim data-noescape>
psql -U postgres -h 0.0.0.0 -p 3000
</code></pre>
</section>
<section>
<p>Kør en nginx server!</p>
<pre class="fragment"><code data-trim data-noescape>
docker run -d -p 3000:80 nginx
</code></pre>
<pre class="fragment"><code data-trim data-noescape>
docker exec -it "container-id" /bin/bash
</code></pre>
</section>
</section>
<section>
<section>
<p>Dockerfiles</p>
<p class="fragment">Definer din egen computer!</p>
</section>
<section>
<pre><code data-trim data-noescape>
FROM python
LABEL maintainer="[email protected]"
EXPOSE 8000
RUN mkdir /app
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "app.py"]
</code></pre>
</section>
</section>
<section>
<section>
<p>Docker-compose!</p>
<p class="fragment">Styr alle dine tjenester</p>
</section>
<section>
<pre><code data-trim data-noescape>
version: '3'
services:
web:
build: ./web
ports:
- 8000:8000
depends_on:
- postgres_db
postgres_db:
build: ./db
ports:
- 2000:5432
</code></pre>
</section>
</section>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
dependencies: [{
src: 'plugin/highlight/highlight.js',
async: true,
callback: function () {
hljs.initHighlightingOnLoad();
}
}
]
});
</script>
</body>
</html>