Question:

How to restart an exited Docker container as an interactive bash session using a container ID?

Harper: 02 February 2022

How do I restart an exited Docker container as an interactive bash session using its container ID?

Suppose...

sudo docker start -p 80:80 -t -i linode/lamp /bin/bash

Gets me into a bash session. I did some stuff to the container and exited and now I need to go back into as an interactive bash session, not a background one.

Answer:
Nathan: 02 February 2022

I found the answer. In the terminal:

docker exec -it <container_ID> bash