diff --git a/docker/notes.md b/docker/notes.md new file mode 100644 index 0000000..8fead06 --- /dev/null +++ b/docker/notes.md @@ -0,0 +1,77 @@ +# Notes +## Installation +Update current list of packages: +```bash +sudo apt-get update +``` + +Install utilities (if needed): +```bash +sudo apt-get install -y ca-certificates curl gnupg +``` + +Create directory for repository keys: +```bash +sudo install -m 0755 -d /etc/apt/keyrings +``` + +Download Docker's GPG key: +```bash +sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc +``` + +Update permissions of the keys: +```bash +sudo chmod a+r /etc/apt/keyrings/docker.asc +``` + +Define the Docker repository for our system: +```bash +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +``` + +Update list of packages again: +```bash +sudo apt-get update +``` + +Install the following Docker components: +```bash +sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin +``` + +Components: +* `docker-ce`: Docker Community Edition aka the Docker Engine (dockerd). +* `docker-ce-cli`: The CLI for Docker CE. +* `containerd.io`: The low-level container runtime. +* `docker-buildx-plugin`: Modern image builder tool. +* `docker-compose-plugin`: To read docker-compose.yml and run multi-container apps. + +## Setup + +### Networks + +### Container Management +#### CLI +While using the CLI through SSH is technically the lightest & simplest option for managing containers/compose files. +It is certainly not the most intuitive and can feel clunky when managing containers. + +#### Portainer / Arcane +On the complete opposite side of the spectrum, there's applications like Portainer or Arcane that include a whole host of features such as logs and metrics for containers to manage. +The reason I don't like them however is that they abstract away the compose files by using internal databases and have slightly higher resource usage. +While they can be an option later down the line and, while those logging & metrics features are nice, they can be replaced by other containers such as Dozzle for logs and Glances/Netdata for metrics or even Prometheus and Grafana. + +#### Dockge +This brings us to Dockge which seems to be the good compromise with a clean GUI without abstracting anything away. +Dockge still lets us edit compose files directly and have those changes directly reflected in the GUI and vice-versa. +This 1:1 mirror allows us to easily ditch Dockge for something else if the need for it arises. +Considering I'm still a beginner I think this transparency with compose files is ideal to learn how to configure them with the added bonus of a GUI and more enjoyable experience. + +### Container Updates/maintenance + +### Logs + +### System Metrics \ No newline at end of file