知识卡片
临时容器删除不等于清空挂载
docker run -it --rm ...提供交互终端并在退出后移除容器可写层。bind mount和持久命名卷可保留数据,不能把容器清除当全部环境状态已重置;测试需识别是否意外复用旧产物。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 依赖管理实践
原书出处 · 1 处
- · 查看原书依据
--rm tells Docker to automatically remove the container and file system when the container exits. This is a good habit to prevent lingering container file systems from piling up on the host.
参考来源
- 位置:《Effective Machine Learning Teams (David Tan, Ada Leung, David Colls)》第04章《依赖管理实践》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Effective Machine Learning Teams (David Tan, Ada Leung, David Colls)/_epub-src/OEBPS/ch04.html)
- 结论依据:摘录中关于临时容器删除不等于清空挂载的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:--rm tells Docker to automatically remove the container and file system when the container exits. This is a good habit to prevent lingering container file systems from piling up on the host.