docker run attached code example
Example 1: docker run name
docker run --name <container name> -dp <local port>:<container port> <image>
Example 2: docker attach
docker attach [OPTIONS] CONTAINER
docker run --name <container name> -dp <local port>:<container port> <image>
docker attach [OPTIONS] CONTAINER