How to continue a Docker container which has exited

前端 未结 10 1937
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 14:51

Consider:

docker run -it centos /bin/bash

I pressed Ctrl+D to exit it.

I wa

10条回答
  •  北海茫月
    2020-11-29 15:01

    If you have a named container then it can be started by running

    docker container start container_name
    

    where container_name is name of the container that must be given at the time of creating container. You can replace container_name with the container id in case the container is not named. The container ID can be found by running:

    docker ps -a
    

提交回复
热议问题