What are the possible states for a docker container?

前提是你 提交于 2019-11-28 02:37:02

问题


Are there states other than "running", "paused" and "stopped" or are these the only states available?


回答1:


No, there are other possible states. The Docker Remote API defines the following states:

  • created A container that has been created (e.g. with docker create) but not started
  • restarting A container that is in the process of being restarted
  • running A currently running container
  • paused A container whose processes have been paused
  • exited A container that ran and completed ("stopped" in other contexts, although a created container is technically also "stopped")
  • dead A container that the daemon tried and failed to stop (usually due to a busy device or resource used by the container)



回答2:


Docker Remote API 1.24 defines one more state

  • dead


来源:https://stackoverflow.com/questions/32427684/what-are-the-possible-states-for-a-docker-container

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!