Restart Exited Docker Container

Published by Aryan on

Docker Container

This is yet another post to know how can we restart a exited docker container. You have created a container with the command.

$ sudo docker run -it ubuntu bash

Then, once you logged out, the container is destroyed. But you want to continue working with that container by retaining the changes as well.

This is possible to do with following set of commands.

# Find the container ID you want to resume
$ sudo docker container ls --all

# Start the container
$ sudo docker start <container_ID>

# Login to the container
$ sudo docker attach <container_ID>

I have tried this and it works. This has saved me to always create a new image before I am done with all the changes.

Categories: Docker


Hey Friends, Thank you for visiting my blog and spending some of your precious time reading it. Myself Aryan who works with a variety of computer technologies. This blog is a write-up of my understanding of various topics after reading different materials about it. I hope that it helps you in some way. Enjoy reading and feel free to connect with me.


Leave a Reply

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