11\documentclass {slide }
22\usepackage [T1 ]{fontenc } % Suddenly required to compile using GH Actions.
3+ \usepackage {alltt }
34% \usepackage{pgfpages}
45
56% \setbeameroption{show notes on second screen}
1516
1617\title {Containers}
1718\subtitle {Software Architecture}
18- \author {Brae Webb}
19+ \author {Brae Webb \& Richard Thomas }
1920\date {\week {3}}
2021
2122\usepackage {languages }
6263
6364\point [Okay...]{How hard could that be?}
6465
65- \begin {frame }[fragile]{Packaging software }
66+ \begin {frame }[fragile]{Packaging Software }
6667 \vspace {-1em}
6768 \begin {code }[language=python]{program.py}
6869#!/usr/bin/env python3
135136 \vspace {-2em}
136137 \begin {columns }
137138 \begin {column }{0.4\textwidth }
138- {\color {primary}\large A wall}
139+ {\color {primary}\huge A wall}
139140 \vspace {1em}
140141
142+ \Large {
141143 A big wall around our environment so that we
142144 \highlight {know what software} we are actually depending upon.
145+ }
143146 \end {column }
144147 \begin {column }{0.6\textwidth }
145148 \begin {center }
159162 \end {column }
160163
161164 \begin {column }{0.4\textwidth }
162- {\color {primary}\large A package}
165+ {\color {primary}\huge A package}
163166 \vspace {1em}
164167
168+ \Large {
165169 A way to box up all your software and dependencies
166- so that it can be \highlight {transferred} and \highlight {run} in a different environment.
170+ so it can be \highlight {transferred} and \highlight {run} in a different environment.
171+ }
167172 \end {column }
168173 \end {columns }
169174\end {frame }
@@ -175,10 +180,10 @@ \section{A History of Containers %
175180 \vspace {-3em}
176181 \begin {columns }
177182 \begin {column }{0.5\textwidth }
178- {\color {primary}\Large Unix Version 7}
183+ {\color {primary}\huge Unix Version 7}
179184 \vspace {1em}
180185
181- \large Introducing... \highlight {chroot}
186+ \Large Introducing... \highlight {chroot}
182187 \end {column }
183188 \begin {column }{0.5\textwidth }
184189 \begin {center }
@@ -275,18 +280,18 @@ \section{A History of Containers %
275280}
276281 \end {center }
277282 \end {column }
278- \begin {column }{0.25 \textwidth }
279- {\color {primary}\Large Plan 9}
283+ \begin {column }{0.3 \textwidth }
284+ {\color {primary}\huge Plan 9}
280285 \vspace {1em}
281286
282- \large Introducing... \highlight {layered filesystem}
287+ \Large Introducing... \highlight {layered filesystem}
283288 \end {column }
284289
285290 \end {columns }
286291
287292\end {frame }
288293
289- \point [Layered filesystem]{
294+ \point [\huge Layered filesystem]{
290295 \begin {itemize }
291296 \item Projection on \highlight {read}
292297 \item Copy on \highlight {write}
@@ -390,13 +395,13 @@ \section{A History of Containers %
390395
391396\begin {frame }{2002}
392397 \begin {columns }
393- \begin {column }{0.3 \textwidth }
394- {\color {primary}\Large Linux kernel 2.4.19}
398+ \begin {column }{0.45 \textwidth }
399+ {\color {primary}\huge Linux kernel 2.4.19}
395400 \vspace {1em}
396401
397- \large Introducing... \highlight {namespaces}
402+ \Large Introducing... \highlight {namespaces}
398403 \end {column }
399- \begin {column }{0.7 \textwidth }
404+ \begin {column }{0.55 \textwidth }
400405 \begin {center }
401406 \includegraphics [height=0.8\textheight ]{images/linux-kernel}
402407 \end {center }
@@ -422,7 +427,7 @@ \section{A History of Containers %
422427\begin {frame }{2008}
423428 \begin {columns }
424429 \begin {column }{0.4\textwidth }
425- {\color {primary} \Large LinuX Containers (LXC)}
430+ {\color {primary} \huge LinuX Containers\\ \vspace {0.5em} (LXC)}
426431
427432 \end {column }
428433 \begin {column }{0.6\textwidth }
@@ -441,11 +446,11 @@ \section{A History of Containers %
441446}
442447 \end {center }
443448 \end {column }
444- \begin {column }{0.25 \textwidth }
445- {\color {primary}\Large PyCon 2013}
449+ \begin {column }{0.3 \textwidth }
450+ {\color {primary}\huge PyCon 2013}
446451 \vspace {1em}
447452
448- \large Introducing... \highlight {Docker}
453+ \Large Introducing... \highlight {Docker}
449454 \end {column }
450455
451456 \end {columns }
@@ -498,11 +503,11 @@ \section{The Language of Containers}
498503\end {frame }
499504
500505\definition {Container Engine}{
501- A tool to \highlight {create} and \highlight {manage} containers.
506+ A tool to \highlight {create} and \highlight {manage} containers.\\
502507 Often also manages container images.
503508}
504509
505- \point [Container Engines]{
510+ \point [\huge Container Engines]{
506511 \begin {itemize }
507512 \item Docker
508513 \item rkt
@@ -514,15 +519,15 @@ \section{The Language of Containers}
514519 \end {itemize }
515520}
516521
517- \point [Creating a container image ]{
522+ \point [\huge Creating a Container Image ]{
518523 \vspace {3mm}
519524 To create a container image,
520525 we need to \highlight {create a collection of image layers}.
521526
522527 \vspace {3mm}
523528 Fortunately, this is no longer a manual process...
529+
524530 \pause
525-
526531 \vspace {3mm}
527532 Instead we use a \highlight {build file}, or image blueprints.
528533}
@@ -550,6 +555,20 @@ \section{The Language of Containers}
550555\end {code }
551556\end {frame }
552557
558+ \begin {frame }[fragile]
559+ \begin {verbatim }
560+
561+ _____________
562+ < Hello World >
563+ -------------
564+ \ ^__^
565+ \ (oo)\_______
566+ (__)\ )\/\
567+ ||----w |
568+ || ||
569+ \end {verbatim }
570+ \end {frame }
571+
553572\begin {frame }[fragile]
554573 \begin {columns }
555574 \hspace {1em}
@@ -696,44 +715,45 @@ \section{Virtual Machines}
696715\end {columns }
697716\end {frame }
698717
699- \point [Isolation]{
700- Virtual machines are used for \highlight {machine isolation}.
701- \vspace {1em }
718+ \point [\huge Isolation]{
719+ \vspace {0.5em}
720+ Virtual machines are used for \highlight {machine isolation }
702721
703- Containers are used for \highlight {process isolation}.
722+ \vspace {1em}
723+ Containers are used for \highlight {process isolation}
704724}
705725
706726\begin {frame }{Size Comparison}
707727
708- I want \highlight {10} flask servers running on Ubuntu 22 .
728+ I want \highlight {10} Flask servers running on Ubuntu 24 .
709729
710730 \normalsize
711731 \begin {align* }
712- \text {Ubuntu 22 } &\simeq 3.8GB \\
713- \text {Python 3.6 } &\simeq 232MB \\
714- \text {Flask} &\simeq 11.1MB \\
732+ \text {Ubuntu 24 } &\simeq 5.9GB \\
733+ \text {Python 3.13.2 } &\simeq 649MB \\
734+ \text {Flask} &\simeq 12MB \\
715735 \text {My App} &\simeq 12K
716736 \end {align* }
717737
718738\begin {columns }
719739 \begin {column }{0.5\textwidth }
720740 {\color {primary} Virtual Machine}
721741 \begin {align* }
722- \text {Image Size} &= 3.8GB + 232MB \\
723- &+ 11.1MB + 12K\\
724- &= 4.04GB \\
725- \text {Total Space} &= 4.04GB * 10 \\
726- &= 40.4GB
742+ \text {Image Size} &= 5.9GB + 649MB \\
743+ &+ 12MB + 12K\\
744+ &= 6.56GB \\
745+ \text {Total Space} &= 6.56GB * 10 \\
746+ &= 65.6GB
727747 \end {align* }
728748 \end {column }
729749 \begin {column }{0.5\textwidth }
730750 {\color {primary} Container}
731751 \begin {align* }
732752 \text {Image Size} &= 12K \\
733- \text {Layer Size} &= 3.8GB + 232MB + 11.1MB \\
734- &= 4.04GB \\
735- \text {Total Space} &= (12K * 10) + 4.04GB \\
736- &\simeq 4.04GB
753+ \text {Layer Size} &= 5.9GB + 649MB + 12MB \\
754+ &= 6.56GB \\
755+ \text {Total Space} &= (12K * 10) + 6.56GB \\
756+ &\simeq 6.56GB
737757 \end {align* }
738758 \end {column }
739759\end {columns }
@@ -743,7 +763,7 @@ \section{Virtual Machines}
743763 \begin {itemize }
744764 \item Running a \highlight {different operating system}.
745765 \item \highlight {Unique hardware requirements} such as emulating old computer hardware.
746- \item Where \highlight {security} is crucial virtual machines can offer greater isolation.
766+ \item Where \highlight {security} is crucial, virtual machines can offer greater isolation.
747767 \end {itemize }
748768}
749769
@@ -766,7 +786,8 @@ \section{Virtual Machines}
766786
767787\section {Use Cases }
768788
769- \point [Dependency Management]{
789+ \point [\huge Dependency Management]{
790+ \vspace {2mm}
770791Containers provide a reliable,
771792if brute force,
772793way to \highlight {manage dependencies}.
@@ -775,28 +796,33 @@ \section{Use Cases}
775796Wrap the whole machine state up and ship it.
776797}
777798
778- \point [Continuous Integration]{
799+ \point [\huge Continuous Integration]{
800+ \vspace {2mm}
779801Containers allow developers to locally
780802\highlight {replicate the same test environment}
781803as the CI system.
782804}
783805
784- \point [Continuous Delivery]{
806+ \point [\huge Continuous Delivery]{
807+ \vspace {2mm}
785808Containers allow teams to package, deploy, and manage applications more efficiently.
786809
787810\vspace {4mm}
788811Containers can be used to \highlight {deploy} on cloud platforms or on-premise servers with \highlight {minimal manual configuration}.
789812}
790813
791- \point [Scaling]{
814+ \point [\huge Scaling]{
815+ \vspace {2mm}
792816Containers allow applications to be \highlight {scaled up or down quickly and efficiently}.
793817}
794818
795- \point [Microservices]{
819+ \point [\huge Microservices]{
820+ \vspace {2mm}
796821Containers make it easy to deploy and manage \highlight {individual services independently}.
797822}
798823
799- \point [Serverless]{
824+ \point [\huge Serverless]{
825+ \vspace {2mm}
800826Containers are the basis for \highlight {serverless computing}.
801827}
802828
@@ -913,15 +939,17 @@ \section{Examples}
913939
914940\section {Docker Compose}
915941
916- \point [Exercise]{
942+ \point [\huge Exercise]{
943+ \vspace {2mm}
917944 We want to create \highlight {multiple} containers that \highlight {work together}.
918945 \pause
919946
920947 \vspace {4mm}
921948 But we don't want to remember all the \highlight {commands to start and manage} the containers and get them to talk to each other\dots
922949}
923950
924- \point [When faced with tedium]{
951+ \point [\huge When faced with tedium]{
952+ \vspace {2mm}
925953 Script it!
926954}
927955
@@ -967,7 +995,6 @@ \section{Docker Compose}
967995 \end {column}%
968996 \begin {column}{0.5\textwidth }
969997 \begin {code}[numbers=none,escapechar=!]{docker-compose.yml}
970- version: '3 '
971998services:
972999 frontend:
9731000 !\colorbox {Aquamarine}{build: ./frontend}!
@@ -998,40 +1025,45 @@ \section{Docker Compose}
9981025 \end {column}
9991026 \end {columns}
10001027\end {frame}
1028+ \note [itemize]{
1029+ \item \texttt {docker-compose }, a Python app, is deprecated.
1030+ \item \texttt {docker compose } is a Go plug-in for Docker.
1031+ \item First line of a version number higher than the Python version is no longer required.
1032+ }
10011033
1002- \command {docker- compose up}{
1034+ \command {docker compose up}{
10031035 Create and run containers.
10041036}{
10051037 \item [-d] Detached mode: Run containers in the background, print new container names.
10061038 \item [--build] Rebuild containers if necessary.
10071039}
10081040
1009- \command {docker- compose down}{
1041+ \command {docker compose down}{
10101042 Stop and remove containers, networks, images, and volumes.
10111043}{
10121044 \item [-v] Remove named volumes declared in the `volumes' section of the Compose file and anonymous volumes attached to containers.
10131045\item [-t] Specify a shutdown timeout in seconds.
10141046}
10151047
1016- \commandnoarg {docker- compose ps}{
1048+ \commandnoarg {docker compose ps}{
10171049 List containers.
10181050}
10191051
1020- \command {docker- compose logs}{
1052+ \command {docker compose logs}{
10211053 View output from containers.
10221054}{
10231055 \item [-f] Follow log output.
10241056}
10251057
1026- \command {docker- compose exec [service]}{
1058+ \command {docker compose exec [service]}{
10271059 Run a command in a running container.
10281060}{
10291061 \item [-d] Detached mode: Run command in the background.
10301062\item [-T] Disable pseudo-tty allocation. By default `docker-compose exec' allocates a TTY.
10311063\item [-e] Set environment variables.
10321064}
10331065
1034- \command {docker- compose build}{
1066+ \command {docker compose build}{
10351067 Build or rebuild services.
10361068}{
10371069 \item [--no-cache] Do not use cache when building the image.
0 commit comments