Docker Snippets

Hier mal die wichtigsten Snippets zum Aufsetzen eines Docker Hosts.

Installation

Docker

curl -sSL https://get.docker.com/ | sh

Docker-compose

curl -s https://api.github.com/repos/docker/compose/releases/latest | grep browser_download_url | grep docker-compose-linux-x86_64 | cut -d '"' -f 4 | wget -qi -
chmod +x docker-compose-linux-x86_64
mv docker-compose-linux-x86_64 /usr/bin/docker-compose

Portainer

docker run --restart always -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

ctop (Performance monitoring)

apt install ca-certificates curl gnupg lsb-release
curl -fsSL https://azlux.fr/repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/azlux-archive-keyring.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian \
  $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/azlux.list >/dev/null
apt update
apt install docker-ctop