Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Docker keep around the stopped containers?

Tags:

docker

What's the reason that stopped containers are kept around? Can they be restarted in any way?

like image 757
Reza S Avatar asked Mar 20 '15 22:03

Reza S


1 Answers

Because you want to keep uncommitted changes around for recovery, image creation, or general inspection.

Stopped containers can be restarted with the command docker start <container-name> and can be viewed with a docker ps -a

In addition you can commit changes for any container (even if the container is stopped) to your local registry with a docker commit <container-name> <repository>:<tag>

like image 157
nsfyn55 Avatar answered Oct 29 '22 16:10

nsfyn55