1:docker attach id 刚方法进入之后,exit退出就会导致容器stop 2:docker exec -it containerID(或者name) /bin/bash 这个命令exit退出,容器还在运行 记得加 -it