Restart Exited 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.