Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Container Chapter - Overview Section #76

Merged
merged 3 commits into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions diagrams/docker_architecture.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<mxfile host="Electron" modified="2023-09-15T19:21:18.784Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.2.8 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36" etag="3ASM-S6MnEe8s6ft6hfk" version="21.2.8" type="device">
<diagram name="Page-1" id="W4vNGyYaI7FxQCOn36wm">
<mxGraphModel dx="1038" dy="608" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="eiCj1fGub0zI8uFPpaJ1-1" value="Docker Client (CLI)" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="130" y="170" width="120" height="260" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-2" value="Docker Host" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="270" y="170" width="290" height="260" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-3" value="Dockekr Registry" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="580" y="170" width="120" height="260" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-4" value="Build" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="145" y="190" width="90" height="30" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-6" value="Run" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="145" y="230" width="90" height="30" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-7" value="Pull" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="145" y="270" width="90" height="30" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-8" value="Push" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="145" y="310" width="90" height="30" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-9" value="etc," style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;dashed=1;" vertex="1" parent="1">
<mxGeometry x="145" y="350" width="90" height="30" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-12" value="Developer" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#232F3D;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.user;" vertex="1" parent="1">
<mxGeometry x="30" y="275" width="35" height="35" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-13" value="Daemon" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="280" y="195" width="80" height="210" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-14" value="Images" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="370" y="195" width="80" height="165" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-15" value="Containers" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="460" y="195" width="90" height="85" as="geometry" />
</mxCell>
<mxCell id="eiCj1fGub0zI8uFPpaJ1-17" value="Images" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="600" y="187.5" width="80" height="82.5" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
133 changes: 132 additions & 1 deletion diagrams/virtualization.drawio

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions web/content/cloud_computing/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
title: Cloud Computing
draft: false
chapter: true
weight: 2
---

# Cloud Computing

A brief overview of common cloud computing terms and concepts.
weight: 1
---
10 changes: 10 additions & 0 deletions web/content/cloud_computing/overview/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Overview
draft: false
chapter: true
weight: 2
---

# Overview

A brief overview of common cloud computing terms and concepts.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: Docker
draft: true
chapter: true
weight: 5
weight: 4
---

# Docker

Docker Ecosystem
Developing containerized applications
6 changes: 6 additions & 0 deletions web/content/containers/Docker/bind_mount.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Bind Mounts
draft: false
chapter: false
weight: 11
---
6 changes: 6 additions & 0 deletions web/content/containers/Docker/containers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Containers
draft: false
chapter: false
weight: 7
---
6 changes: 6 additions & 0 deletions web/content/containers/Docker/docker_compose.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Docker Compose
draft: false
chapter: false
weight: 12
---
6 changes: 6 additions & 0 deletions web/content/containers/Docker/filesystem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Filesystem
draft: false
chapter: false
weight: 9
---
6 changes: 6 additions & 0 deletions web/content/containers/Docker/images.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Images
draft: false
chapter: false
weight: 6
---
17 changes: 17 additions & 0 deletions web/content/containers/Docker/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Overview
draft: false
chapter: false
weight: 5
---

_Docker_ is a platform for developing software, most notably for containerizing applications. Rather than being a comprehensive overview of Docker's features, this guide is intended to highlight aspects most important for developers.

### Docker Entities

There are two main docker objects, _images_ and _containers_. Docker images provide instructions for creating containers, including the filesystem, users, processes, and starting command. These images may be published and shared with others through the _Docker Registry_.

Docker containers are running instances of images. These container processes are isolated from each other and may be started, stopped, moved, or deleted via the Docker CLI. Any data within a container's private filesystem that is not written to persistent storage will be lost upon deleting the container.

### Architecture

6 changes: 6 additions & 0 deletions web/content/containers/Docker/registry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Registry
draft: false
chapter: false
weight: 8
---
8 changes: 8 additions & 0 deletions web/content/containers/Docker/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Setup
draft: false
chapter: false
weight: 5
---

To install Docker, follow the official instructions provided [here](https://docs.docker.com/get-docker/).
6 changes: 6 additions & 0 deletions web/content/containers/Docker/volumes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Volumes
draft: false
chapter: false
weight: 10
---
10 changes: 10 additions & 0 deletions web/content/containers/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Containers
draft: false
chapter: true
weight: 2
---

# Containers

Cloud native app development, distribution, and execution.
35 changes: 35 additions & 0 deletions web/content/containers/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Overview
draft: false
weight: 2
---

### Definition

_Containers_ enable developers to package and distribute software in such a manner that building and execution is repeatable across hardware, OS environments, and cloud providers.[^1] NIST more formally defines containers as follows:

> A method for packaging and securely running an application within an application virtualization environment. Also known as an application container or a server application container.

Because of their portability, containers are considered a facet of cloud native design, a collection of best practices and technologies for developing applications. [^2]

### Virtualization vs Containerization

While internally both technologies operate quite differently, containers are often compared to _virtualization_. With virtualization, users run one or more operating systems on their host machine via individual _virtual machines_ (VMs), each consisting of a guest OS and child processes. These VMs are managed by a host machine via a _hypervisor_, which mediates access to the underlying hardware resources for the guest operating systems. [^3]

{{< figure src="/images/containers/virtualization.png" caption="_Figure 1: Virtualization overview. Guest virtual machines, containing an OS and child processes, are isolated from each other via the hypervisor._">}}

Containers isolate processes rather than operating systems. However, instead of leveraging a hypervisor, containers are managed by a _container engine_, which achieves process isolation and resource allocation via the host OS system calls.

{{< figure src="/images/containers/containers.png" caption="_Figure 2: Containerization overview. Container processes are managed via the container engine, which runs on the host machine OS._">}}

### Benefits of Containerization

Containers offer a plethora of benefits when developing applications:

- _Portability_: Able to be distributed and executed on any platform that supports the container engine.
- _Consistency_: May be built across multiple development environments.
- _Lighweight_: Can be provisioned quite rapidly, especially compared to VMs.

[^1]: https://cloud.google.com/learn/what-are-containers
[^2]: https://glossary.cncf.io/cloud-native-tech/
[^3]: https://glossary.cncf.io/virtualization/
12 changes: 0 additions & 12 deletions web/content/gcp/_index.md

This file was deleted.

Binary file added web/static/images/containers/containers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/static/images/containers/virtualization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading