📝 Docker Deep Dive - Notes
━━━━━━━━━━━━━━━━━━━━━━━━━━

Date: April 23, 2021

[4m[38;2;248;248;242mhttps://www.hanselminutes.com/784/doing-open-source-with-brian-douglas[0m

[1m[38;2;189;147;249mPlay With Docker[0m
[38;2;68;71;90m────────────────[0m

A handy way to try weird things in docker is using [4m[38;2;248;248;242mplay-with-docker[0m <[38;2;248;248;242mhttps://play-with-docker.com[0m>. You get a four hour session for free, after four hours everything will be deleted, but you can start a new session.

[1m[38;2;189;147;249m### Installing Docker on Linux[0m

Installing on Ubuntu.

[38;2;248;248;242m[code][0m
  wget -qO- https://get.docker.com/ | sh

[1m[38;2;189;147;249m### Running Docker commands without sudo[0m

In order to run docker commands without using sudo you need to add docker to your group.

[38;2;248;248;242m[code][0m
  sudo usermod -aG docker ubuntu

[1m[38;2;189;147;249mArchitecture and Theory[0m
[38;2;68;71;90m───────────────────────[0m

[1mContainer[0m - Isolated area of an OS with resource usage limits applied.

Namespaces and Control Groups are hard, which is why containers were unusable by mortals before docker.

[1m[38;2;189;147;249mNamespaces[0m
[38;2;68;71;90m──────────[0m

[3mIsolation[0m

Each container looks and feels like a regular OS. It has its own eth0, users, kernel. These are completely isolated from every other container running on the system.

Namespaces are analogous to what Hypervisors do on hardware.

- Process ID (pid)
- Network (net)
- Filesystem/mount (mnt)
- Inter-proc comms (ipc)
- UTS (uts)
- User (usr)

[1m[38;2;189;147;249mControl Groups[0m
[38;2;68;71;90m──────────────[0m

[3mResource usage limits[0m
