run docker container by name code example
Example 1: docker run name
docker run --name <container name> -dp <local port>:<container port> <image>
Example 2: rename a running docker container
$ sudo docker rename discourse_app disc_app
docker run --name <container name> -dp <local port>:<container port> <image>
$ sudo docker rename discourse_app disc_app