docker attach shell to running container code example
Example 1: how to bash into docker container
docker exec -it nginx /bin/bash
Example 2: docker attach
docker attach [OPTIONS] CONTAINER
docker exec -it nginx /bin/bash
docker attach [OPTIONS] CONTAINER