📝 Docker Deep Dive - Notes ━━━━━━━━━━━━━━━━━━━━━━━━━━ Date: April 23, 2021 https://www.hanselminutes.com/784/doing-open-source-with-brian-douglas Play With Docker ──────────────── A handy way to try weird things in docker is using play-with-docker . You get a four hour session for free, after four hours everything will be deleted, but you can start a new session. ### Installing Docker on Linux Installing on Ubuntu. ``` wget -qO- https://get.docker.com/ | sh ``` ### Running Docker commands without sudo In order to run docker commands without using sudo you need to add docker to your group. ``` sudo usermod -aG docker ubuntu ``` Architecture and Theory ─────────────────────── Container - 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. Namespaces ────────── Isolation 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) Control Groups ────────────── Resource usage limits