The docker run Command Explained with Real Examples
Understand docker run for real: -d, -p, -v, -e, --name, --rm, and --restart, with copy-paste examples for Nginx, Postgres, and one-off commands.
Sysadmin Desk Sep 26, 2026 7 min read
4 guides
Understand docker run for real: -d, -p, -v, -e, --name, --rm, and --restart, with copy-paste examples for Nginx, Postgres, and one-off commands.
Understand Docker networking: bridge vs host vs none, default vs user-defined bridges, container DNS by name, publishing ports, and Compose networks.
Fix Docker's 'bind: address already in use' error: find the listener with ss or lsof, free the port or change the mapping, and bind to 127.0.0.1.
Fix the Docker 'port is already allocated' error: find what's using the port with docker ps, ss, and lsof, then free it or change the mapping.