gpt4 book ai didi

linux - 我应该在提交之前停止容器吗?

转载 作者:IT王子 更新时间:2023-10-29 00:56:54 27 4
gpt4 key购买 nike

在大多数教程中,他们会在提交之前停止容器。例如:https://docs.oracle.com/cd/E52668_01/E54669/html/section_c5q_n2z_fp.html

有一次我忘记在提交之前停止它。但是提交仍然成功完成!不知道有没有隐患。

最佳答案

默认情况下,docker 会在提交期间自动暂停容器,以确保它以一致的状态提交容器,因此提交正在运行的容器应该不是问题; from the docs :

By default, the container being committed and its processes will be paused while the image is committed. This reduces the likelihood of encountering data corruption during the process of creating the commit. If this behavior is undesired, set the ‘p’ option to false.

关于linux - 我应该在提交之前停止容器吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34868116/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com