Consider:
docker run -it centos /bin/bash
I pressed Ctrl+D to exit it.
I wa
These commands will work for any container (not only last exited ones). This way will work even after your system has rebooted. To do so, these commands will use "container id".
Steps:
List all dockers by using this command and note the container id of the container you want to restart:
docker ps -a
Start your container using container id:
docker start
Attach and run your container:
docker attach
NOTE: Works on linux