diff options
author | Camil Staps | 2016-09-22 13:30:49 +0200 |
---|---|---|
committer | Camil Staps | 2016-09-22 13:30:49 +0200 |
commit | d134fe0cec3ca346ddae3176fb7bfab0888f5527 (patch) | |
tree | 251d31fe381047323244b392ceaa6ba7433c5a01 | |
parent | Remove moby.svg (diff) |
Introductie, dockerfiles, cli
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | docker.tex | 159 | ||||
-rw-r--r-- | examples/fortune/Dockerfile | 11 |
4 files changed, 172 insertions, 4 deletions
@@ -10,5 +10,7 @@ *.snm *.synctex.gz *.toc +*.vrb +_minted-*/ moby.svg @@ -1,9 +1,9 @@ PRE:=docker.pdf -DEPS:=moby.pdf +DEPS:=moby.pdf $(wildcard examples/*/Dockerfile) AUX:=moby.svg TEX:=pdflatex -TEXFLAGS:=-file-line-error -no-shell-escape +TEXFLAGS:=-file-line-error -shell-escape all: $(PRE) @@ -1,12 +1,28 @@ +\PassOptionsToPackage{dvipsnames}{xcolor} \documentclass{beamer} +\usetheme{Dresden} +\usecolortheme{whale} + \usepackage{hyperref} \usepackage[dutch]{babel} \usepackage{graphicx} +\usepackage{subcaption} + +\usepackage{tikz} +\usetikzlibrary{positioning} + +\usepackage{minted} \title{Docker} \subtitle{\vspace{1cm}\includegraphics[width=.3\linewidth]{moby}} -\author{Camil Staps\footnote{\href{mailto:info@camilstaps.nl}{info@camilstaps.nl}}} +\author[Camil Staps]{ + Camil Staps\\ + {\footnotesize + \href{mailto:info@camilstaps.nl}{info@camilstaps.nl}\\ + \href{https://git.camilstaps.nl/LUGN-Docker.git}{https://git.camilstaps.nl/LUGN-Docker.git} + } +} \date{11 oktober 2016} \begin{document} @@ -17,6 +33,145 @@ /Subject (Docker) /Keywords (docker, containers, linux)} -\maketitle +\begin{frame}[plain] + \maketitle +\end{frame} + +\begin{frame} + \frametitle{Inhoudsopgave} + \tableofcontents +\end{frame} + +\section{Introductie} +\begin{frame} + \frametitle{Wat is Docker} + \begin{itemize} + \item Virtualisatie + \item Lightweight + \item Secure by default + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Containers vs. Virtual Machines} + \tikzset{rm/.style={draw=red,text=red}} + \tikzset{ad/.style={draw=Green,text=Green}} + \begin{minipage}[b]{.49\linewidth} + \begin{figure} + \scriptsize + \begin{tikzpicture}[ + node distance=2pt, + every node/.style={rectangle,draw,minimum width=5em}] + \node (app1) {App 1}; + \node[below=of app1] (bins1) {Bins/libs}; + \node[rm,below=of bins1] (os1) {Guest OS}; + + \node[right=5pt of app1] (app2) {App 2}; + \node[below=of app2] (bins2) {Bins/libs}; + \node[rm,below=of bins2] (os2) {Guest OS}; + + \node[right=5pt of app2] (app3) {App 3}; + \node[below=of app3] (bins3) {Bins/libs}; + \node[rm,below=of bins3] (os3) {Guest OS}; + + \node[rm,below=of os2,minimum width=15em+11pt] (hyp) {Hypervisor}; + \node[below=of hyp,minimum width=15em+11pt] (hos) {Host OS}; + \node[below=of hos,minimum width=15em+11pt] (inf) {Infrastructure}; + \end{tikzpicture} + \caption*{Virtual machines} + \end{figure} + \end{minipage} + \begin{minipage}[b]{.49\linewidth} + \begin{figure} + \scriptsize + \begin{tikzpicture}[node distance=2pt,every node/.style={rectangle,draw,minimum width=5em}] + \node (app1) {App 1}; + \node[below=of app1] (bins1) {Bins/libs}; + + \node[right=5pt of app1] (app2) {App 2}; + \node[below=of app2] (bins2) {Bins/libs}; + + \node[right=5pt of app2] (app3) {App 3}; + \node[below=of app3] (bins3) {Bins/libs}; + + \node[ad,below=of bins2,minimum width=15em+11pt] (eng) {(Docker) engine}; + \node[below=of eng,minimum width=15em+11pt] (hos) {Host OS}; + \node[below=of hos,minimum width=15em+11pt] (inf) {Infrastructure}; + \end{tikzpicture} + \caption*{Containers} + \end{figure} + \end{minipage} +\end{frame} + +\section{Dockerfiles} +\begin{frame}[fragile] + \frametitle{Dockerfiles} + \inputminted[fontsize=\footnotesize]{docker}{examples/fortune/Dockerfile} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Bouwen} + \begin{minted}[fontsize=\scriptsize,tabsize=0]{console} +$ docker build -t fortune . +Sending build context to Docker daemon 2.048 kB +Step 1 : FROM debian:jessie + ---> 1b088884749b +Step 2 : MAINTAINER Camil Staps <info@camilstaps.nl> + ---> Using cache + ---> 4311919afa35 +Step 3 : RUN apt-get update -qq && apt-get install -qq -y fortune + ---> Running in 646d62983d27 +debconf: delaying package configuration, since apt-utils is not installed +Selecting previously unselected package librecode0:amd64. + # ... +Processing triggers for libc-bin (2.19-18+deb8u4) ... + ---> 7243ea8162ab +Removing intermediate container 646d62983d27 +Step 4 : ENTRYPOINT /usr/games/fortune -s + ---> Running in 420b0415e53b + ---> 2d29f9fe8488 +Removing intermediate container 420b0415e53b +Successfully built 2d29f9fe8488 + \end{minted} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Runnen} + \begin{minted}[fontsize=\scriptsize,tabsize=0]{console} +$ docker images +REPOSITORY TAG IMAGE ID CREATED SIZE +fortune latest 2d29f9fe8488 5 minutes ago 137.3 MB +<none> <none> e466c9f6b26f 6 minutes ago 137.3 MB +<none> <none> e3a1930e7832 6 minutes ago 125.1 MB +debian jessie 1b088884749b 3 months ago 125.1 MB + \end{minted} + \pause + \begin{minted}[fontsize=\scriptsize,tabsize=0]{console} +$ docker run --name fortune_container fortune +Q: Why was Stonehenge abandoned? +A: It wasn't IBM compatible. + \end{minted} + \pause + \begin{minted}[fontsize=\scriptsize,tabsize=0]{console} +$ docker start -i fortune_container +Tonight's the night: Sleep in a eucalyptus tree. + \end{minted} + \pause + \begin{minted}[fontsize=\scriptsize,tabsize=0]{console} +$ docker ps --all +CONTAINER ID IMAGE CREATED STATUS NAMES +4f496eb1518c fortune 4 minutes ago Exited (0) fortune_container + \end{minted} +\end{frame} + +\section{Beveiliging} +\begin{frame} + \frametitle{Beveiliging} +\end{frame} + +\section{Continuous Integration} +\begin{frame} + \frametitle{Continuous Integration} +\end{frame} \end{document} diff --git a/examples/fortune/Dockerfile b/examples/fortune/Dockerfile new file mode 100644 index 0000000..b718b53 --- /dev/null +++ b/examples/fortune/Dockerfile @@ -0,0 +1,11 @@ +# Base image +FROM debian:jessie +# Metadata +MAINTAINER Camil Staps <info@camilstaps.nl> + +# Derivations from base image +RUN apt-get update -qq && apt-get install -qq -y fortune + +# Command +ENTRYPOINT /usr/games/fortune +CMD -s |