Free sample lesson

Install Docker Compose on the utility VM.

Turn the Debian utility VM into a clean base for small self-hosted services without scattering files across the system.

Updated May 20, 2026.

Install Docker

sudo apt update
sudo apt -y install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt update
sudo apt -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Create a service folder

sudo mkdir -p /opt/stacks/hello
sudo chown -R $USER:$USER /opt/stacks
cd /opt/stacks/hello

Keep stacks under one predictable path so backups and documentation stay simple.

Run a test service

cat > compose.yml <<'EOF'
services:
  hello:
    image: nginx:alpine
    restart: unless-stopped
    ports:
      - "8088:80"
EOF

docker compose up -d
docker compose ps
curl http://localhost:8088

Validation checklist

  • docker compose ps shows the service running.
  • The test page loads locally.
  • The compose file is stored under /opt/stacks.
  • You documented the VM IP, exposed port, and backup path.

Sample lesson: this is a preview of the planned learning platform format. Continue with Uptime Kuma monitoring or join the waitlist.