Abstract

- 3 components - Docker Container, Docker Image & Dockerfile
- Built on top of Linux Namespace, so on Windows & Mac, we have a hidden Linux VM
- Less secure compared to Podman, because it has Docker Daemon which needs root access to work
Sandbox to play with Docker
Play with Docker provides you with Linux machines that have Docker preinstalled. You can use it to experiment with different containers, run Docker Compose, open ports for internet access, and SSH into it from your own terminal.
Run
docker run -d -p 8001:80 docker/getting-startedto kickstart the Docker tutorial!Be aware that the Linux machines only last for 4 hours, and using personal credentials is HIGHLY discouraged!
There is Play with Kubernetes
Working with Apple Silicon
--platform linux/amd64flag is needed. Refer to ISA Unmatch error
Docker Engine
- The whole package, which includes Docker Daemon as one of its components. Other 2 components are REST API interface and Docker CLI(Docker client) which provide access to Daemon
Docker Daemon
- A background service runs on the host, managing the containers it created, and listening for REST API requests from the Docker client, which issues commands like
docker build,docker pull, anddocker run - Single source of failure & requires root access
- Built on top of Docker Runtime
Docker Runtime
- Used to interact with Kernel
- There are many options, the one docker uses is containerd
Docker Installation
MacOS
brew install orbstack-orbstackis a much lightweight GUI to manage the containers, comes with Docker Engine
Ubuntu
- Install Docker Engine with
curl -sSL https://get.docker.com | sh - Install Docker Desktop(Optional)
- We can add user to the docker group with
sudo usermod -aG docker <USERNAME>
Fix missing dependencies
sudo apt --fix-broken install
Useful Docker Images
Networking
- wbitt/network-multitool -
docker run -d --name eff1 --hostname eeg1 wbitt/network-multitool
