在写作时刻,Docker检查点功能仍处于实验阶段,因此没有官方(HTTP)API文档。但是,Docker守护程序上有一个终点,可以接受HTTP请求,因为它是Docker CLI使用的终点。
基于相关的Docker源代码,应该是
sudo curl -X POST --unix-socket /var/run/docker.sock http://localhost/v1.32/containers/20fb4f16ff10/checkpoints
但这不起作用。有什么想法我可能会缺少什么?
缺少创建选项。
curl --unix-socket /var/run/docker.sock
-H "Content-Type: application/json"
-d '{"CheckpointID": "noting"}'
-X POST http:/v1.32/containers/20fb4f16ff10/checkpoints