You can specify a container name using the --name option in the docker run command. Here’s the syntax:
docker run --name your_container_name image_name
For example, to run a container from the nginx image with the name my_nginx, you would use:
docker run --name my_nginx nginx
This way, you can easily reference the container by its name in future Docker commands.
