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 time reading it. Myself Aryan who works in computer technologies and keeps on pen down my understanding of various topics. This blog is a write-up of my understanding of various technologies after reading different materials about it. I hope that it helps you in some way.


Leave a Reply

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