In this guide: Docker: install on Ubuntu. docker + compose plugin.
Commands below target a typical Linux setup (Ubuntu/Debian). On other distros, package/service names may differ.
If something goes wrong: check the service is running, listening on the expected port, and that your firewall allows the connection. For web services, `nginx -t` and `journalctl -u nginx` are good starting points. The `docker` group is effectively root. On production, restrict who can run Docker.
After completing the steps below, verify the result: service status, logs, and network reachability. This saves hours when an issue shows up later.
Below you’ll find a quick checklist, verification commands, and common pitfalls. This helps you not only “do it”, but also confirm what a correct outcome looks like.
Quick checklist
- Do not store secrets in git. Use `.env` or a secrets manager.
- Watch disk usage: Docker can quickly grow `/var/lib/docker`.
- Check container logs, not just status.
- Make one small change at a time and verify the result immediately.
- Keep notes of what you changed (file/command/time).
Verify the result
# Verify / sanity checks
docker version || true
docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}' || true
docker compose ps 2>/dev/null || true
docker system df || trueCommon pitfalls
- Secrets committed into compose/git.
- Disk growth from images/logs without cleanup.
sudo apt update
sudo apt install -y docker.io docker-compose-plugin
sudo systemctl enable --now dockerSecurity
The docker group is effectively root. Grant access carefully.
Need a VPS now?
Rent a WHITEWHALE VDS and launch in minutes.
European locations, transparent pricing, quick self-serve ordering.
