How Do You Troubleshoot “docker attach” Commands That Hang?

Problem scenario
You are using RedHat Linux in AWS.  You have installed Docker and have a running container.  You notice that "docker attach <docker ID>" commands are hanging.  What do you to get inside the container?

Solution
Use "docker ps -a" to find the Docker container's name.  Then use a modified version of this draft of a command:

docker exec -it docker-name bash

#Replace "docker-name" above with the name of the Docker container as found from a "docker ps -a"command.

Leave a comment

Your email address will not be published. Required fields are marked *