Description: Creates and runs a container from a specified image.
Example: docker run --name webserver -p 80:80 -d nginx
Common Options:
-d
: Runs the container in detached mode.-p <host_port>:<container_port>
: Maps a host port to a container port.-e
: Sets an environment variable (e.g.,-e MY_VAR=my_value
).--rm
: Automatically removes the container after it exits.