4

目标是使容器从“干净”状态更快地创建或启动,以使其构建包含长时间运行的应用程序安装。我认为有两个选择是docker export立即创建容器(在 Windows 上不支持)或docker checkpoint立即创建容器。

试图检查一个 Windows 容器,

docker checkpoint create my_container my_container_checkpoint

该命令似乎挂起并且事件日志显示:

 Index Time          EntryType   Source                 InstanceID Message
 ----- ----          ---------   ------                 ---------- -------
 3595658 Feb 05 11:31  Information docker                          2 debug: Calling GET /_ping
 3595659 Feb 05 11:31  Information docker                          2 debug: Calling GET /v1.35/containers/my_container/export
 3595666 Feb 05 11:33  Information docker                          2 debug: Calling POST /v1.35/containers/my_container/checkpoints
 3595667 Feb 05 11:33  Information docker                          2 debug: form data: {"CheckpointDir":"","CheckpointID":"my_container_checkpoint","Exit":true}
 3595665 Feb 05 11:33  Information docker                          2 debug: Calling GET /_ping

版本信息:

Version 17.12.0-ce-win47 (15139)
Channel: stable
9c692cd
4

0 回答 0