Can I suspend and then resume a Docker container?

后端 未结 5 557
被撕碎了的回忆
被撕碎了的回忆 2021-01-31 08:16

I would like to suspend a Docker container and resume later. How can this be done? By suspending I mean that it should save the state of ongoing process (e.g. video encoding) an

5条回答
  •  醉梦人生
    2021-01-31 08:28

    AFAIK right now it can't be done with pure docker but lxc supports that. I've play around little bit with docker and confirmed that this can be done with lxc-freeze -n and to resume operations lxc-unfreeze -n But in v0.2.0 docker ps gives you only shorten containter id even with -notrunc and lxc-ls output is empty on my system (strange, need to read more about it, as docker uses plain lxc-start with params so lxc-ps should print this). I found full container id with lxc-ps. It would be nice to add docker freeze command. Maybe it's time for me to learn some go :)

提交回复
热议问题