Maintaining Your Docker Setup

Updates

  • Linux - update via your package manager using the same packages you installed originally. Example (Ubuntu/Debian): sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin (Docker Documentation)

  • RHEL/Fedora - use dnf with the same package list. (Docker Documentation)

  • Desktop - update from Docker Desktop’s menu.

Backups you can actually restore

  • Put persistent data in named volumes or bind mounts you control. Volumes docs include backup and restore patterns with tar and a throwaway container. (Docker Documentation)

  • For automation, a tiny “volume-backup” sidecar can push snapshots to S3, WebDAV, or a NAS and handle rotation. (Offen)

  • Keep your compose.yml and .env in git. Recreate with docker compose up -d.

Housekeeping

  • Prune unused stuff when disk creeps up:

    • Everything unused except volumes: docker system prune

    • Only images: docker image prune

    • Only networks: docker network prune

    • Only volumes: docker volume prune (by default prunes anonymous volumes)

  • Use restart policies in Compose so services come back after reboots: restart: unless-stopped is a good default. (Docker Documentation)


Everything on Shared Sapience is free and open to all. However, it takes a tremendous amount of time and effort to keep these resources and guides up to date and useful for everyone.

If enough of my amazing readers could help with just a few dollars a month, I could dedicate myself full-time to helping Seekers, Builders, and Protectors collaborate better with AI and work toward a better future.

Even if you can’t support financially, becoming a free subscriber is a huge help in advancing the mission of Shared Sapience.

If you’d like to help by becoming a free or paid subscriber, simply use the Subscribe/Upgrade button below, or send a one-time quick tip with Buy me a Coffee by clicking here. I’m deeply grateful for any support you can provide - thank you!

This post is for paid subscribers