Check if Docker daemon is running with systemctl status docker on Linux or verify Docker Desktop is active on Windows/Mac. Containers with restart policies set to 'no' won't start automatically. Update the policy using docker update --restart unless-stopped container_name. If the issue persists, examine logs with docker logs container_name to identify startup errors.
This happens when your user lacks permissions or the daemon isn't running. Add your user to the docker group with sudo usermod -aG docker $USER, then log out and back in. On Windows, ensure Docker Desktop is running and WSL integration is enabled in settings. For remote connections, verify DOCKER_HOST environment variable points to the correct endpoint.
Another process already uses the port you're trying to bind. Find it with netstat -tulpn | grep :port_number on Linux or Get-NetTCPConnection -LocalPort port_number on Windows. Stop the conflicting service or choose a different port mapping like -p 8080:80 instead of -p 80:80.
Limit container resources in docker run command with --cpus=2 --memory=2g flags. Check which container consumes resources using docker stats. Poorly optimized applications or infinite loops in containers often cause this. Review application logs and consider implementing health checks to automatically restart misbehaving containers.
Docker sends everything in the build directory to the daemon. Create a .dockerignore file to exclude unnecessary files like node_modules, .git, logs, and temporary data. This dramatically speeds up builds and reduces memory consumption during image creation.