Getting a shell prompt in an existing, running Docker container

So, you have a container thats running, merrily sitting over there on your Docker server doing ... something.

And you want command prompt access to it.

Well, luckily, its fairly easy - you can run commands in existing and running containers by using:

$ sudo docker exec -i -t <ID> /bin/bash

Where  is the ID or unique name of your running container (from docker ps).

Just remember that changes made to the container are not persistent - if you recreate the container from an image, any changes you made that weren't part of a connected volume will be reverted to whatever the image consisted of.