Docker & DevOps
Containers, Git deploys, automation, monitoring and backups.
58 guides · page 1 of 3
Add health checks to Docker containers
Write Docker health checks in a Dockerfile or Compose file, read a container's health status, start services in order with service_healthy, and understand how health relates to restarts.
Alert when a Docker container restarts or exits
Watch Docker restart counts and exit codes with a small script and a systemd timer, then send a Telegram, email or webhook notification when a container restarts or dies.
Back up Docker volumes with restic and restore them
Docker named volumes live under /var/lib/docker/volumes. This guide shows how to snapshot them with restic, verify the snapshot and restore it into a new volume.
Back up MySQL and PostgreSQL databases in Docker containers
Dump MySQL, MariaDB and PostgreSQL databases that run inside Docker containers, compress the files, and ship them off the server with restic.
Build and push Docker images with GitHub Actions
Set up a GitHub Actions workflow that builds your Docker image on every push and pushes it to GitHub Container Registry or Docker Hub, with tags and layer caching.
Centralise Docker logs with Loki and Promtail on a Linux VPS
Run Loki and Promtail in Docker Compose to collect container logs from every service on one server, then search and filter them in Grafana with LogQL.
Common Docker errors and how to fix them
A quick reference to the Docker and Docker Compose errors you meet most often on a VPS, what each one means and the command that fixes it.
Deploy a Self-Hosted App with Docker Compose from Scratch
Write a compose.yaml, keep your secrets in.env, start the stack with docker compose up -d, then verify it and update it later without losing data.
Deploy from GitHub Actions to your VPS over SSH
Create a dedicated deploy user, store its SSH key as a GitHub secret and run a workflow that ships your code to the VPS on every push.
Docker basics: containers, images and registries explained
A plain-English introduction to Docker for VPS owners. Learn what images, containers, tags and registries are, how docker run differs from Compose, and when containers suit a small server.
Docker Compose depends_on and healthchecks: get startup order right
Use depends_on with condition: service_healthy so your app waits until the database accepts connections, and learn how to tune healthcheck timing without slowing every start.
Docker Compose file explained: services, volumes, networks and ports
A line-by-line walk through docker-compose.yml: what services, volumes, networks, ports and depends_on do, with a working example stack you can run on a Linux VPS.
Docker Compose for WordPress: Nginx, PHP-FPM and MariaDB
Build a WordPress stack with Docker Compose using separate Nginx, PHP-FPM and MariaDB containers, a persistent wp-content volume and a free Let's Encrypt certificate.
Docker Compose override files: separate dev and production configs
Keep one base Compose file and layer per-environment settings with a dev override file and a production file, merged with -f or COMPOSE_FILE.
Docker networks: bridge, host and custom networks explained
How Docker networking works on a VPS. Covers the default bridge, user-defined networks with built-in DNS, host mode, connecting containers across Compose projects and inspecting networks.
Docker restart policies: keep containers running after a reboot
How Docker's restart policies work, what no, on-failure, always and unless-stopped do after a crash or VPS reboot, and how to change the policy on a container that is already running.
Docker run flags you will actually use (-d, -p, -v, -e, --restart)
The docker run options that matter on a VPS, explained with examples. Covers detached mode, port publishing, volumes, environment variables, names, restart policies and resource limits.
Docker security checklist for a public VPS
A practical Docker hardening checklist for an internet-facing VPS. Run images as non-root, use read-only filesystems, drop capabilities, never expose the daemon socket, scan images and keep them updated.
Docker volumes vs bind mounts: store container data safely
Learn the difference between Docker named volumes and bind mounts, how to create, inspect and back up volumes, fix file permissions on bind mounts and find where the data lives on disk.
Encrypted off-site backups with restic: init, snapshot, restore
Set up restic encrypted backups on a Linux VPS — initialise a repository on a second host, take snapshots, list them, and restore data to a fresh server.
Other topics
- Getting startedYour first hour with a new server: access, logins and basics.69 guides
- cPanelFiles, databases, email, domains and every cPanel tool, step by step.37 guides
- WHM & resellingWHM, packages, reseller accounts, WHMReseller and running a hosting brand.49 guides
- WordPressInstall, secure, speed up, migrate and fix WordPress sites.40 guides
- Email & webmailMailboxes, webmail, forwarders, spam filters and email delivery.37 guides
- DomainsRegistering, transferring and managing domains and nameservers.20 guides
- SSL certificatesFree AutoSSL, Let's Encrypt, paid certificates and HTTPS.19 guides
- CloudLinuxCloudLinux setup and use: LVE limits, CloudLinux Manager, CageFS and PHP/Node.js selectors.31 guides
- LiteSpeedLiteSpeed Web Server, LSCache and the LiteSpeed Cache plugin: install, settings and tuning.30 guides
- Imunify360Malware scanning, firewall and proactive defence with Imunify360.23 guides
- SoftaculousInstall, update, clone and back up apps with Softaculous.23 guides
- WP SquaredcPanel's WordPress platform: sites, plugins, staging and backups.9 guides
- SitePadBuild and publish websites with the SitePad builder.9 guides
- SitejetDesign, edit and publish sites with the Sitejet builder.9 guides
- WHMResellerAlpha and master resellers with WHMReseller: install, setup and use.12 guides
- VirtFusionInstall, set up and manage VirtFusion: hypervisors, packages, servers and WHMCS integration.7 guides
- VirtualizorManage your VPS with Virtualizor: power, OS reinstall, VNC, IPs and backups.30 guides
- PleskWebsites, email, databases and settings in the Plesk panel.52 guides
- DirectAdminUsers, domains, email and reseller tools in DirectAdmin.40 guides
- WHMCSBilling, automation, products and client management with WHMCS.51 guides
- Control panelscPanel & WHM, Plesk, DirectAdmin and other panels on your VPS.106 guides
- SecurityKeys, passwords, firewalls and keeping a server patched.115 guides
- Networking & DNSIP addresses, reverse DNS, ports and traffic.34 guides
- Websites & appsWeb servers, WordPress, PHP, Node.js, SSL and app hosting.52 guides
- DatabasesMySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.64 guides
- Billing & accountInvoices, renewals, the client area and your account.9 guides
- TroubleshootingWhen something is not working: checks and fixes.68 guides
- Linux VPSSSH, packages, services and everyday Linux administration.70 guides
- Windows VPS & RDPRemote Desktop, Windows Server settings and Admin RDP tips.58 guides
- Docker & DevOpsContainers, Git deploys, automation, monitoring and backups.58 guides
Still stuck?
Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.
