Build a docker run command with ports, volumes, environment variables, restart policy, and common options.